Constructing a Thin-Wall Body

The function

MbResultType ThinSolid(       MbSolid &          solid,
                              MbeCopyMode        sameShell,
                              RPArray<MbFace> &  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 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 MbeCopyMode enumeration is described in detail in the section 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:

../../../../_images/M.2.13.1.png

Fig. 1

Figure 2 shows the constructed thin-wall body result with preserved faces thickened inward from the source body:

../../../../_images/M.2.13.2.png

Fig. 2

Figure 3 shows the constructed thin-wall body result with preserved faces thickened outward from the source body:

../../../../_images/M.2.13.3.png

Fig. 3

Figure 4 shows the constructed non-closed body result:

../../../../_images/M.2.13.4.png

Fig. 4

Figure 5 shows the thin-wall body constructed with an empty set of faces to be removed:

../../../../_images/M.2.13.5.png

Fig. 5

The ThinSolid() function adds the MbShellSolid builder to the log of the constructed body, which contains all necessary data for performing the operation. The 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”.