Bending an Unbent Sheet Solid
The function
MbResultType BendSheetSolid( MbSolid & solid,
MbeCopyMode sameShell,
const RPArray<MbSheetMetalBend> & bends,
const MbFace & fixedFace,
const MbCartPoint & fixedPoint,
MbSNameMaker & nameMaker,
MbSolid *& result )
puts the specified bends of a sheet solid into the bent state.
The input parameters of the function are:
solid – the source solid;
sameShell – the copy mode for the source solid;
bends – the set of bends, each consisting of arrays of face pairs: the inner and outer faces of the bend;
fixedFace – the face that remains fixed;
fixedPoint – a point in the parametric domain of the underlying surface of fixedFace, if fixedFace is a bend face;
nameMaker – the name maker of the operation.
The output parameter of the function is the resultant solid result.
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.
The function bends the unbent bends of a sheet solid relative to the fixedFace. If fixedFace is a sheet face belonging to one of the bends in bends, bending is performed such that the plane tangent to the underlying surface of fixedFace at point fixedPoint remains fixed.
As a rule, each element of the bends array contains only one pair of sheet faces – the inner and outer sheet faces of the bend. However, in the case of a ruled shell built from two sketches, a situation may arise where a chain of adjacent bends can only be bent simultaneously. In that case, the element of the bends array must include the entire chain as pairs of the corresponding outer and inner faces of the composite bend. All links of such a chain are marked by the ruled shell creation operation with the same value in the MbSMBendNames::groupNumber field, distinct from SYS_MAX_UINT. If groupNumber equals SYS_MAX_UINT, the bend is a single one and does not belong to any chain. If the values in groupNumber differ, the links belong to different chains of simultaneously bent/unbent bends.
Fig. 1 shows the sheet solid in the unbent state:
Fig. 1
Fig. 2 shows the sheet solid after the bend operation:
Fig. 2
The BendSheetSolid() function adds the MbBendUnbendSolid builder to the history of the constructed solid. The builder contains all the data necessary to perform the operation. The MbBendUnbendSolid builder is declared in cr_sheet_bend_unbend_solid.h.