Constructing a Shell Ring

The function

MbResultType CreateRuledSolid(       MbRuledSolidValues &      parameters,
                               const MbSNameMaker &            nameMaker,
                                     RPArray<MbSMBendNames> &  resultBends,
                                     MbContour *&              resultContour,
                                     MbSolid *&                resultSolid )

constructs a shell ring from one or two planar contours by extrusion with a draft angle.

The input parameters of the function are:

  • parameters – the shell ring parameters;

  • nameMaker – the name maker with the main name of the operation.

The output parameters of the function are the names of the sheet faces of the constructed bends, written to the bend parameters resultBends, the contour resultContour (the contour parameters.contour1 rounded according to the specified parameters), and the resultant solid resultSolid. The operation also fills the contour segmentation parameter arrays parameters.breaks1 and parameters.breaks2 if they were empty at the time of the function call.

If successful, the function returns rt_Success; otherwise, it returns an error code from the MbResultType enumeration (see mb_operation_result.h).

The function is declared in action_sheet.h.

A shell ring is constructed from one or two planar contours.

In the case of one contour, the shell ring is constructed by extruding the contour rounded according to the parameters, possibly with a draft angle, and then supplying the resulting surface with a thickness.

If the contour is closed, a gap is created at the location specified in the operation parameters. When constructing with a draft angle, it is possible to create either conical bends or radius-preserving cylindrical bends at the fillet locations of the original contour. Arc segmentation of the contour is also available, whereby an arc is replaced by a set of line segments that approximate it. The parameters.joinByVertices flag controls how contour segments are joined: when set to true, segments are joined through the contour vertices (default behavior).

In addition to specifying the shell ring height via parameters.height, it is possible to limit the extrusion to an arbitrary surface. To do so, assign a pointer to the surface in the parameters.surface field and set the offset distance from that surface in parameters.surfDistance (see the definition of MbRuledSolidValues in sheet_metal_param.h).

In the case of two contours, the contour segments are connected, in general, by ruled surfaces, which are then supplied with a thickness.

The shape of the lateral faces of a ruled surface can be specified using the flags of the MbRuledSolidValues structure:

  • guideSidesByNorm defines the shape of gap faces (true – the lateral faces are formed from normals to the sheet faces; false – the gap faces are coplanar planes);

  • generSidesByNorm defines the shape of shell bases (true – the bases are formed from normals to the sheet faces; false – the bases are the sketch planes used to construct the shell).

When constructing a shell ring from two sketches, a fairly common situation is the formation of an entire chain of pairs of inner and outer bend faces that can only be bent and unbent simultaneously. Bends belonging to such a chain are marked with the same value in the MbSMBendNames::groupNumber field, which differs from SYS_MAX_UINT. To bend/unbend such a chain, the inner and outer faces belonging to it must be placed in the corresponding arrays of the MbSheetMetalBend structure in the bend/unbend operation parameters, rather than creating a separate MbSheetMetalBend structure for each link of the chain. If groupNumber contains SYS_MAX_UINT, the bend consists of a single segment.

Fig. 1 shows a shell ring constructed without preserving the bend radius:

../../../../_images/M.7.2.1.png

Fig. 1

Fig. 2 shows a shell ring constructed with the bend radius preserved:

../../../../_images/M.7.2.2.png

Fig. 2

Fig. 3 shows a shell ring constructed with arc segmentation of the second contour:

../../../../_images/M.7.2.3.png

Fig. 3

The CreateRuledSolid() function adds the MbRuledShell builder to the history of the constructed solid. The builder contains all the data necessary to perform the operation. The MbRuledShell builder is declared in cr_ruled_shell.h.