CFx SDK Documentation 2024 SP0
|
#include <FMProfile2DBool.h>
Classes | |
class | ArgStub |
Public Types | |
enum | Operations { eoUnknown = 0 , eoOR , eoAND , eoSUB , eoXOR , eoLastOper } |
Public Member Functions | |
Profile2DBool (const OdGeTol &gTol=FMGeGbl::gTol) | |
~Profile2DBool () | |
Profile2DBool & | reset (const OdGeTol &gTol=FMGeGbl::gTol) |
Result | evalRegions (Operations eOper, ArgStub rArg1, ArgStub rArg2, Profile2D &rResult) |
Result | evalLinesRegion (Operations eOper, ArgStub rLinesArg, ArgStub rRegionArg, Profile2D &rResult, bool bRegionIsOpen=false) |
Result | evalLines (Operations eOper, ArgStub rArg1, ArgStub rArg2, Profile2D &rResult) |
Result | pushRegion (ArgStub rArg, bool bSaveCopy=true) |
Result | evalPushedRegions (Operations eOper, Profile2D &rResult) |
Result | stencilFlags (ArgStub rSource, ArgStub rStencilRegion, Profile2D &rResult, OdUInt32 uMask, OdUInt32 uInBits, OdUInt32 uOutBits=0, OdUInt32 uBoundaryBits=0) |
This class contains methods performing Boolean operations on 2-D regions and lines
Definition at line 48 of file FMProfile2DBool.h.
Operation type.
Enumerator | |
---|---|
eoUnknown | |
eoOR | |
eoAND | |
eoSUB | |
eoXOR | |
eoLastOper |
Definition at line 54 of file FMProfile2DBool.h.
FacetModeler::Profile2DBool::Profile2DBool | ( | const OdGeTol & | gTol = FMGeGbl::gTol | ) |
Constructor.
FacetModeler::Profile2DBool::~Profile2DBool | ( | ) |
Destructor.
Result FacetModeler::Profile2DBool::evalLines | ( | Operations | eOper, |
ArgStub | rArg1, | ||
ArgStub | rArg2, | ||
Profile2D & | rResult | ||
) |
Perform Boolean operation on lines
eOper | [in] operation code. One of: eoOR, eoAND, eoSUB, eoXOR |
rArg1 | [in] first group of lines |
rArg1 | [in] second group of lines |
rResult | [out] resulting lines (modified only if operation succeeds) |
Result FacetModeler::Profile2DBool::evalLinesRegion | ( | Operations | eOper, |
ArgStub | rLinesArg, | ||
ArgStub | rRegionArg, | ||
Profile2D & | rResult, | ||
bool | bRegionIsOpen = false |
||
) |
Cuts lines (rLinesArg) by a region (rArg2) and returns
eOper | [in] operation code. One of: eoAND, eoSUB |
rLinesArg | [in] contours, which should be cut |
rRegionArg | [in] contours of the cutting region |
rResult | [out] resulting contours (modified only if operation succeeds) |
bRegionIsOpen | [in] if true, region boundary points are not included in the cutting region |
Result FacetModeler::Profile2DBool::evalPushedRegions | ( | Operations | eOper, |
Profile2D & | rResult | ||
) |
Performs Boolean operation on multiple regions
eOper | [in] operation code. One of: eoOR, eoAND, eoSUB, eoXOR |
rResult | [out] resulting region (modified only if operation succeeds) |
Result FacetModeler::Profile2DBool::evalRegions | ( | Operations | eOper, |
ArgStub | rArg1, | ||
ArgStub | rArg2, | ||
Profile2D & | rResult | ||
) |
Performs Boolean operation on 2 regions
eOper | [in] operation code. One of: eoOR, eoAND, eoSUB, eoXOR |
rArg1 | [in] contours of the first region |
rArg2 | [in] contours of the second region |
rResult | [out] resulting region (modified only if operation succeeds) |
Store a reference to perform some operation(s) later
rArg | [in] region (closed contours) to store |
Profile2DBool & FacetModeler::Profile2DBool::reset | ( | const OdGeTol & | gTol = FMGeGbl::gTol | ) |
Resets the intersector to default values and updates tolerance
Result FacetModeler::Profile2DBool::stencilFlags | ( | ArgStub | rSource, |
ArgStub | rStencilRegion, | ||
Profile2D & | rResult, | ||
OdUInt32 | uMask, | ||
OdUInt32 | uInBits, | ||
OdUInt32 | uOutBits = 0 , |
||
OdUInt32 | uBoundaryBits = 0 |
||
) |
Intersects rSource with rStencilRegion and stores modified source contours with updated metadata in rResult
rSource | [in] sorce contours (open, closed, any ) |
rStencilRegion | [in] contours of the stencil region |
rResult | [out] resulting contours (modified only if operation succeeds) |
uMask | [in] flags to modify. use OdUInt32(-1) to modify all flags |
uInBits | [in] set these bits on segments inside rStencilRegion |
uOutBits | [in] set these bits on segments outside rStencilRegion |
uBoundaryBits | [in] set these bits on boundary segments |
Example: What stencilFlags( cSrc, cStencil, cSrc, 0x1F, 0x1, 0x0, 0x3 ) does ? It splits cSrc segments by cStencil (so that every resulting segment lays either inside or outside or on boundary of cStencil region). Then it updates metadata() values of the resulting segments. It clears 5 lower bits (0x1F) of all metadata and then sets bit 0 (0x1) on inside segments and bits 0 and 1 (0x3) on boundary ones.