Naming of Faces, Edges and Vertices
Faces, edges, and vertices in the data structure have a name MbName. Class MbName is declared in file name_item.h. Naming of faces, edges, and vertices is performed by the C3D geometric kernel when constructing a face set MbFaceShell in all shape-forming operations. In the parameters of each shape-forming operation there is an object MbSNameMaker. Object MbSNameMaker contains the main name of the operation and a container of simple names of type SimpleName that are used for naming faces. Object MbSNameMaker assigns names to the constructed faces using elements of the simple-name container. The simple-name container may contain either a set of unique integers, or a single integer, or no integers at all.
If the simple-name container contains a single integer, then MbSNameMaker will generate the remaining required simple names itself by adding integers of the natural sequence to the initial value. If the simple-name container is empty, then the starting integer is zero. Each integer from the simple-name container corresponds to one of the geometric input parameters (a segment of the operation’s shape-forming contour, an edge processed by the operation, a face modified by the operation, and so on) and is used to name a new face created by the operation.
Face names are unique if the elements of the simple-name container are unique. Edges obtain names by hashing the names of the faces they connect. Vertices obtain names by hashing the names of the edges that meet at the vertex. As an identifier of a face, edge, or vertex one can use the integer returned by method MbName::Hash() of the corresponding topological object. Faces, edges, and vertices in a solid can be searched by a known MbName using methods FindFaceByName(…), FindEdgeByName(…), FindVertexByName(…).
In addition, object MbSNameMaker contains the version of the construction method and ensures preservation of old construction methods when they are modified during evolution of the geometric kernel.