Face Body Sloping
MbResultType DraftSolid( MbSolid & solid,
MbeCopyMode sameShell,
const MbDraftSolidParams & draftParams,
MbDraftSolidResults & result );
The function DraftSolid() constructs a body with sloping of specified body faces from a neutral plane or neutral edges at a given angle.
The input parameters of the function are:
solid - the source body;
sameShell - a copy mode for the source body;
draftParams - draft parameters.
The output parameter of the function is the result object of the MbDraftSolidResults class, which contains the constructed draft body and a hot point attribute of the draft.
The function returns an operation result code from the MbResultType enumeration.
The function is declared in the file action_solid.h.
The function constructs a body whose faces are sloped relative to their position in the source body solid.
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 (the source shell is not copied).
cm_KeepHistory (the source shell and its copy have common base surfaces, vertices, and unchanged operation faces).
cm_KeepSurface (the source shell and its copy have common base surfaces).
cm_Copy (the source shell and its copy have no common data).
The enumeration MbeCopyMode is described in detail in section Copying a Set of Faces MbFaceShell.
The parameter draftParams specifies the construction parameters.
In the class MbDraftSolidParams, to initialize the object draftParams with sloping parameters, the following constructors are used (see op_shell_parameter.h):
Constructors by a neutral plane and an operation namer:
MbDraftSolidParams( const c3d::FacesSPtrVector & faces,
const MbPlacement3D & neutralPlane,
const MbSNameMaker & names,
double angle,
MbeFacePropagation faceProp,
bool reverse );
MbDraftSolidParams( const c3d::FacesSPtrVector & faces,
const MbPlacement3D & neutralPlane,
const MbSNameMaker & names,
double angle,
MbeFacePropagation faceProp,
bool reverse,
bool rebuildFillets );
MbDraftSolidParams( const RPArray<MbFace> & faces,
const MbPlacement3D & neutralPlane,
const MbSNameMaker & names,
double angle,
MbeFacePropagation faceProp,
bool reverse );
where
faces - sloped faces;
neutralPlane - a neutral plane;
names - a name maker;
angle - a sloping angle;
faceProp - a flag for capturing faces that smoothly join with sloped faces;
reverse - a flag for reverse sloping direction.
Constructors for edge set and an operation namer:
MbDraftSolidParams( const c3d::FacesSPtrVector & faces,
const c3d::EdgesSPtrVector & edges,
const MbVector3D & dir,
const MbSNameMaker & names,
double angle,
MbeFacePropagation faceProp,
bool reverse );
MbDraftSolidParams( const c3d::FacesSPtrVector & faces,
const c3d::EdgesSPtrVector & edges,
const MbVector3D & dir,
const MbSNameMaker & names,
double angle,
MbeFacePropagation faceProp,
bool reverse,
bool rebuildFillets );
where
faces - sloped faces;
edges - neutral edges;
dir - a base direction;
names - a namer;
angle - a sloping angle;
faceProp - a flag for capturing faces that smoothly join with sloped faces;
reverse - a flag for reverse sloping direction;
rebuildFillets - a flag for rebuilding adjacent fillets.
The parameter angle specifies the draft angle of the specified body faces from the set faces relative to the neutral plane neutralPlane or relative to the neutral edges edges and the direction dir (depending on the constructor used).
The parameter faceProp controls the addition to the set of sloped faces faces of other body faces that smoothly join with the sloped faces.
The parameter reverse controls the sloping direction.
The parameter rebuildFillets controls the rebuilding of adjacent fillets.
The parameter names provides naming of faces, edges and vertices of the constructed body.
Figure 1 shows the source body solid, the neutral plane neutralPlane relative to whose XY plane the face sloping is performed, and the sloped faces faces:
Fig. 1
Figure 2 shows the result of constructing a body with a slope of the specified faces:
Fig. 2
The function adds the builder MbDraftSolid to the construction history of the resulting body. The builder MbDraftSolid contains all the data required to perform the operation. The builder MbDraftSolid is declared in the file cr_draft_solid.h.
In the test application test.exe the sloping of specified body faces is performed by the menu command “Create→Solid→By faces processing→Faces drafting”.