Topological Object MbTopItem

The MbTopItem class is declared in the topology_item.h file.

The MbTopItem class is derived from the MbRefItem and TapeBase classes and is the base class for topological objects. Among the topological objects, the class of named topological objects MbTopologyItem is distinguished. It is derived from the MbTopItem and MbAttributeContainer classes. The topology object proxy MbTopologyProxy is derived from MbTopologyItem and is used in naming algorithms. The MbTopologyItem class is also declared in the topology_item.h file.

The C3D geometric kernel operates on the topological objects shown in Figure:

../../../../_images/O.2.3.1.png

The following topological objects are derived from the MbTopItem class:

MbFaceShell – a set of faces;

MbLoop – a cycle of edges forming a face boundary;

MbOrientedEdge – an oriented edge of a cycle;

MbTopologyItem – a named topological object.

The following objects are derived from the named topological object MbTopologyItem:

MbVertex – a vertex;

MbEdge – an edge;

MbFace – a face.

The edge has a descendant MbCurveEdge that describes a smooth junction of two faces or a face boundary.

The interaction of named topological objects with attributes is provided by the attribute container MbAttributeContainer.

The main methods of named topological objects are:

virtual void Transform( const MbMatrix3D &     matr,
                              MbRegTransform * iReg = nullptr );
virtual void Move( const MbVector3D &     to,
                         MbRegTransform * iReg = nullptr );
virtual void Rotate( const MbAxis3D &       axis,
                           double           angle,
                           MbRegTransform * iReg = nullptr );

These methods perform transformations of a topological object and operations with its name and attributes. When a transformation is performed, the MbRegTransform registrar is used to prevent multiple transformations of nested objects. If an object contains pointers or references to other objects, then the nested objects are also transformed. The registrar must be used when several related objects are transformed sequentially and their relationship is defined by pointers or references to common objects. Performing transformations without a registrar may lead to multiple transformations of common nested objects.

To identify their type, topological objects are equipped with the IsA() method, which returns a type from the enumeration of topological objects MbeTopologyType.