The Abstract Geometry Library (ageomlib) is a set of object oriented classes designed for representing hierarchical boundary representations of solids. The classes are structured in two class hierarchies using multiple inheritance: the first based on geometry and the second based on the range of types of defineable objects in its scope.
The primary class hierarchy is based on geometry. It classifies geometry primarily based on the number of topological degrees of freedom within the entity. For example, a vertex has 0 DOF's, a line segment has 1 DOF, and a triangle has 2 DOF's. So when reading the names of classes 1D or 2D refers to these DOF's and not to the dimension in which they are embedded (this is assumed to be 3D unless there are constraints which lower the embedding dimension).
The classes take on a constructive mentality where higher level entities are built up from simpler ones. For instance, the general face type builds upon the 1D contour which takes care of piecing together 1D elements to build closed 1D contours. The face uses the contours to define an area.
Primitives are abstracted away. Higher level constructs never deal with primitives; they only act on classes of primitives. For example, triangles, faces, and spline patches are all elements of the CAGOpen2D geometry class. CAGOpen2D defines a common interface with which callers will interact with any of those primitives. The primitives then implement the interface based on their specific parameters. In the end, different primitives do very different things, but to the outside caller a triangle is no different than a spline patch.
Instancing of elements is transparent. The class hierarchy is designed in such a way that to a caller an instance of a piece of geometry or an actual piece of geometry behave in exactly the same way. This data abstraction is tricky to provide because not only does instancing allow you to change the location of a piece of geometry using transformations such as rotations, scales, and translations, but it also allows you to use a piece of geometry with its orientation reversed. Reversal of orientation is needed for mirror operations, and it is useful for explicit sharing of construct boundaries.
The second class hierarchy has to do with scoping and typing rules for resolving references when building up a model. The scopes are type limited, where constructs never allow higher DOF entities to be defined within their scopes. The scopes do need to allow for definition of lower DOF entities which will make up it up, so every enclosing scope must allow for the definition of any types which are legal in the scopes within it and possibly more types. This scope hierarchy replaces symbol tables when parsing a description in from a file.
I could not fit all of the classes of ageomlib into a single legible drawing, so I broke out the larger subclasses and put them in separate figures. CAGGeometry1D, CAGGeometry2D, CAGGeometry3D, and CAGDSG are all abstract types with their own subclasses which are discussed below.
These classes of geometry describe entities which have length but no area.
These classes of geometry describe entities which have area but no volume.
These classes of geometry describe entities which have volume.
These classes of geometry describe machining features. DSG stands for destructive solid geometry. All of these entities describe volumes which will be removed from a solid by machining operations.