.. role:: blue :class: blue MbFaceShell Set of Faces ======================== .. _MbFaceShell_Set_of_Faces_: .. версия ядра: Class :blue:`MbFaceShell` is declared in file *topology_faceset.h*. Set of faces :blue:`MbFaceShell` is a derived class of the topological object :ref:`MbTopItem `. The data structure of :blue:`MbFaceShell` contains a set of faces RPArray<:ref:`MbFace `> **faceSet** and a closedness flag *closed* of the face set. The face set also has some additional data that are optional and serve to speed up methods of the face set. The face set usually describes a connected portion of the surface of a modeled object. Faces of the set that are connected to each other satisfy certain conditions, namely: faces join each other along common edges; at each edge only two faces meet; moreover, faces join so that the outer side of one face passes into the outer side of another face, and the common surface formed by the adjoining faces must not have self-intersections. Fig. 1 shows a set of faces connected to each other. All face edges belong to two loops; for all edges the pointers **facePlus** and **faceMinus** are not null, and the curves :ref:`MbSurfaceIntersectionCurve ` on which the face edges are constructed have **curveOne.surface** != **curveTwo.surface**. .. figure:: /MODELER/TOPOLOGICAL_OBJECTS/pictures/O.7.8.1.png :width: 10cm :align: center Fig. 1 The faces shown in the figure form a common closed surface; the outer side of each face passes into the outer side of the neighboring face. For a face set that has no boundary edges, the *closed* flag takes the value true. If at least one face of the set has at least one boundary edge, then the *closed* flag of the face set takes the value false. Fig. 2 shows a set of faces, some of which have boundary edges. Boundary edges belong only to one loop, and for boundary edges of a face only one of the pointers **facePlus** or **faceMinus** is not null, while the curves :ref:`MbSurfaceIntersectionCurve ` on which the edges are constructed have **curveOne.surface** == **curveTwo.surface** and parameter *buildType = cbt_Boundary*. A pole edge is not a boundary edge, because it does not form a border. .. figure:: /MODELER/TOPOLOGICAL_OBJECTS/pictures/O.7.8.2.png :width: 10cm :align: center Fig. 2 A connected face set is called a *closed shell* if the faces of the set have no border. If faces adjoining each other have at least one boundary edge, then such a connected face set is called an *open shell*. Note that a closed shell and an open shell represent a connected set of faces adjoining each other. A face set may consist of several parts that are not connected to each other. Fig. 3 shows a face set describing two open shells. .. figure:: /MODELER/TOPOLOGICAL_OBJECTS/pictures/O.7.8.3.png :width: 10cm :align: center Fig. 3 Formally, no constraints are imposed on faces of the set. A face set may consist of separate faces. Fig. 4 shows a set of faces that are not connected to each other. Each face shown in the figure forms a separate shell; all edges of the faces are boundary edges. .. figure:: /MODELER/TOPOLOGICAL_OBJECTS/pictures/O.7.8.4.png :width: 10cm :align: center Fig. 4 The main methods of a shell are methods for transforming it in space: void :blue:`Move`\( const :ref:`MbVector3D ` & **v**, MbRegTransform * iReg = NULL ), void :blue:`Rotate`\( const MbAxis3D & **axis**, double **angle**, MbRegTransform * iReg = NULL ), void :blue:`Transform`\( const :ref:`MbMatrix3D ` & **m**, MbRegTransform * iReg = NULL ), methods for searching faces, edges, and vertices, as well as methods for determining the position of a point relative to a closed shell: bool :blue:`DistanceToBound`\( const :ref:`MbCartPoint3D ` &, ...), bool :blue:`PointClassification`\( const :ref:`MbCartPoint3D ` &, ...). An open shell describes only a part of the boundary surface of a modeled object. Open shells are used for surface modeling. If a closed shell is supplemented with a set of points lying inside it, then we obtain a *solid body*. Closed shells are used for solid modeling. Trimming and joining of faces are performed simultaneously with shell construction. This is provided by methods of the C3D geometric kernel. Objects of a geometric model are constructed on the basis of closed and open shells.