.. role:: blue :class: blue Constructing a Thin-Wall Body ============================== .. _Constructing_a_Thin-Wall_Body_: .. kernel version: 118041 The function .. code-block:: cpp MbResultType ThinSolid( MbSolid & solid, MbeCopyMode sameShell, RPArray & outFaces, SweptValues & params, const MbSNameMaker & names, bool copyFaceAttrs, MbSolid *& result ); constructs a thin-wall body by excluding the specified faces from the source body and optionally assigning a uniform thickness to the remaining faces. The input parameters of the function are: - **solid** is the source body; - **sameShell** is the copying mode of the source body; - **outFaces** are the faces to be removed from the body; - **params** are the operation parameters; - **names** is the name maker; - **copyFaceAttrs** is the flag for copying attributes from source faces to offset faces. The output parameter of the function is the **result** object that contains the constructed body. The function returns an operation result code from the :ref:`MbResultType ` enumeration. The function is declared in the *action_solid.h* file. The function removes the specified faces **outFaces** from the source body **solid** and "assigns the specified thickness" to the remaining faces. The parameter **sameShell** controls the transfer of faces, edges, and vertices from the source body **solid** to the constructed body **result** and can take one of four values: - *cm_Same = 0* (shell is not copied); - *cm_KeepHistory* (source shell and its copy share base surfaces, vertices, and faces unchanged by the operation); - *cm_KeepSurface* (source shell and its copy share base surfaces); - *cm_Copy* (source shell and its copy have no shared data). The :blue:`MbeCopyMode` enumeration is described in detail in the section :ref:`Copying a Set of MbFaceShell Faces `. The parameter **params** contains information about the wall thickness of preserved faces and the closure of the constructed body **result** (see *op_swept_parameter.h*). The wall thickness of preserved faces can be equal to **params**.\ *thickness1* in the positive normal direction of the face or **params**.\ *thickness2* in the negative normal direction. If **params**.\ *shellClosed* = *false*, a non-closed body will be constructed. The parameter **params**.\ *checkSelfInt* specifies whether the construction result should be checked for self-intersection. By default, **params**.\ *checkSelfInt* = *false* (no check is performed). The **params**.\ *mergeFlags* field controls merging of geometrically similar faces and edges (*mergeFaces* = *true* — merge similar faces, *mergeEdges* = *true* — merge similar edges). The parameter **names** provides naming for faces, edges, and vertices of the constructed body. For the operation to succeed, the faces to be removed **outFaces** must not have smooth mating edges along their common boundary with the preserved faces of the source body. The parameter **copyFaceAttrs** controls copying attributes from source faces to offset faces. Figure 1 shows the source body **solid** and faces to be removed **outFaces**: .. figure:: /MODELER/OPERATIONS_ON_BODIES/pictures/M.2.13.1.png :width: 12cm :align: center Fig. 1 Figure 2 shows the constructed thin-wall body **result** with preserved faces thickened inward from the source body: .. figure:: /MODELER/OPERATIONS_ON_BODIES/pictures/M.2.13.2.png :width: 12cm :align: center Fig. 2 Figure 3 shows the constructed thin-wall body **result** with preserved faces thickened outward from the source body: .. figure:: /MODELER/OPERATIONS_ON_BODIES/pictures/M.2.13.3.png :width: 12cm :align: center Fig. 3 Figure 4 shows the constructed non-closed body **result**: .. figure:: /MODELER/OPERATIONS_ON_BODIES/pictures/M.2.13.4.png :width: 12cm :align: center Fig. 4 Figure 5 shows the thin-wall body constructed with an empty set of faces to be removed: .. figure:: /MODELER/OPERATIONS_ON_BODIES/pictures/M.2.13.5.png :width: 12cm :align: center Fig. 5 The :blue:`ThinSolid`\() function adds the :blue:`MbShellSolid` builder to the log of the constructed body, which contains all necessary data for performing the operation. The :blue:`MbShellSolid` builder is declared in the *cr_thin_shell_solid.h* file. In the test application *test.exe*, thin-wall body construction is performed using the menu command "Create → Solid → By faces processing → Thin-walled with a constant thickness".