CFx SDK Documentation
2020SP3
|
Go to the documentation of this file.
23 #ifndef __FM_IMP_PROFILE2D_BOOL_H__
24 #define __FM_IMP_PROFILE2D_BOOL_H__
98 inline const T&
min(
const T&
x,
const T&
y)
100 return (
x<=
y ?
x :
y );
105 inline const T&
max(
const T&
x,
const T&
y)
107 return (
x>=
y ?
x :
y );
134 inline const std::vector< Edge* >&
getEdges()
const {
return m_vecEdges; };
143 std::vector< std::pair< double, Node * > > m_vecNodes;
146 std::vector< Edge* > m_vecEdges;
155 egtLinesWithDirection = egtLines | 0x01,
157 egtRegionNormal = egtRegion,
158 egtRegionPositive = egtRegion | 0x01,
159 egtRegionOrdered = egtRegion | 0x02,
206 : m_ptCenter( ptC ), m_uHotID(0) { };
221 typedef std::pair< EdgeDirection, Edge * >
EdgeLink;
243 std::vector< EdgeLink > m_vecEdges;
264 inline double param(
int ePos )
const {
return m_aParams[ePos]; };
265 inline Node *
node (
int ePos )
const {
return m_aNodes[ePos]; };
284 efSourceReversed = 0x01,
289 efFinalReversed = 0x20,
293 inline bool isFinal()
const {
return 0 != (m_uFlags & efFinal); };
305 Node * m_aNodes[ eNodePositions ];
306 OdUInt32 m_aIndices[ eNodePositions ];
308 double m_aParams[ eNodePositions ];
339 std::vector< Edge * > m_vecEdges;
376 bool bValidateNesting =
false,
382 int& riRegularityFlags,
476 std::vector< Contour > m_vecContours;
477 std::vector< Group > m_vecGroups;
479 std::vector< Node * > m_vecNodes;
480 std::vector< Edge * > m_vecEdges;
481 std::vector< EdgeGroup * > m_vecEdgeGroups;
483 int m_iRegularityFlags;
501 void initTolerance (
const OdGeTol & gTol );
504 void resetIntermediate();
517 Result FindCrossings( std::vector< Crossing > & vecCrossings );
520 Result CreateNodes(
const std::vector< Crossing > & vecCrossings );
523 Result CreateEdges(
bool bStoreEdges =
false,
bool bStoreFirstGroupOnly =
false );
526 Result CreateEdgeGroups( );
532 Result CreateFinalContours();
537 Result GenerateFinalContour(
const std::vector<Edge*> & vecEdges,
IContour2D & rDestC2D,
bool bClosed );
549 std::vector<OdUInt32> * pvecValid = 0,
550 std::vector<Result> * pvecResults = 0,
568 #endif //__FM_IMP_PROFILE2D_BOOL_H__
static FMGEOMETRY_API_STATIC OdGeTol gTol
const OdGeTol & getPairTol() const
Node(const OdGePoint2d &ptC)
const Group & getGroup(OdUInt32 uGroupIdx) const
void setRegularityFlags(int iFlags)
const Contour & contour() const
static EdgeGroup * GroupEdges(Intersector &rAI, Edge &rEdgeA, Edge &rEdgeB, bool bCoDirectional)
const Contour & getContour(OdUInt32 uContourID) const
Edge & setEdgeGroup(EdgeGroup *pGroup, OdUInt32 iIndex)
Edge * findFinalRegionalNeighbour(const Edge *pEdge, EdgeDirection eEdgeDir, EdgeDirection eNeighbourDir, bool bCCW=false) const
OdUInt32 setFlag(OdUInt32 uFlag)
Result createEdges(Intersector &rAI, bool bStoreEdges=false)
Node * anotherNode(int ePos) const
const IEdgeChecker & getChecker() const
EdgeGroup(Edge *pFirstEdge, Edge *pSecondEdge=0)
Edge * edge(OdUInt32 iIndex)
void reverseFinalEdge(OdUInt32 iIndex)
Edge * addEdge(Edge *pEdge)
Edge * getPrevFinalRegional(bool bContoursCCW=true) const
OdUInt32 priority() const
Edge * findFinalEdge(EdgeDirection eEdgeDir) const
Result TestRegularity(const Profile2D &rSource, int &riRegularityFlags, int iInterestingFlags=erfAllFlags, InfinityLocation eIL=eilByBiggestArea, const OdGeTol &gTol=FMGeGbl::gTol)
const T & min(const T &x, const T &y)
OdUInt32 addGroup(Group::GroupTypes eT, OdUInt32 uPriority=0, OdUInt32 uReservedSize=0)
OdUInt32 numGroups() const
const OdGeTol & getMergeTol() const
const std::vector< Edge * > & getEdges() const
Result addContour(OdUInt32 uGroup, const IContour2D &rContour, bool bReversed=false, bool bForceCopy=false)
Edge * getNextFinalLinear(bool bStopAtJunctions=false) const
const EdgeLink & edgeLink(OdUInt32 iIndex) const
static bool TryFastPerformOperation(BooleanOperation eType, const Profile2D &rArg1, const Profile2D &rArg2, Profile2D &rResult)
Result PerformOperation(BooleanOperation eType, const Profile2D &rArg1, const Profile2D &rArg2, Profile2D &rResult, const OdGeTol &gTol=FMGeGbl::gTol)
Edge * getNextFinalRegional(bool bContoursCCW=true) const
Edge(const Contour &rC, double dStartP, double dEndP)
Intersector & intersector() const
OdUInt32 regionId() const
Result evaluateFlags(const IFlagSetter &rFlagSetter)
Group(Intersector &rAI, GroupTypes eT, OdUInt32 uPri, OdUInt32 uFirst=0, OdUInt32 uSize=0)
OdUInt32 numContours() const
OdUInt32 getFlag(OdUInt32 uFlag) const
const OdGeTol & getTol() const
const OdGePoint2d & middlePoint() const
void moveResultTo(Profile2D &rDest)
Locations getLocation(const OdGePoint2d &ptTest, const OdGeTol gTol) const
void reserve(OdUInt32 uGroups, OdUInt32 uContours)
Edge & setNode(OdUInt32 ePos, Node *pNode, OdUInt32 iIndex)
const T & max(const T &x, const T &y)
void updateFinalEdges(bool bReorderByAngle, double dTgStep)
std::pair< EdgeDirection, Edge * > EdgeLink
OdUInt32 indexInNode(int ePos) const
Node * addNode(Node *pNode)
OdUInt32 edgeCount() const
Result evaluate(OperationsExt eOp)
EdgeGroup * addEdgeGroup(EdgeGroup *pEdgeGroup)
void addNode(Node *pNode, double dParam)
const OdGePoint2d & middlePoint() const
EdgeGroup * edgeGroup() const
EdgeGroup & setFlags(OdUInt32 uFlags, OdUInt32 uUnsetFirst=0)
Node * node(int ePos) const
const Profile2D & getResult() const
EdgeGroup & merge(EdgeGroup *pGroup2)
void reset(const OdGeTol &gTol=FMGeGbl::gTol)
double param(int ePos) const
double tangentAt(int ePos, double dStep) const
OdUInt32 firstIdx() const
const IContour2D & contour2D() const
EdgeGroup & addEdge(Edge *pEdge)
void createEdgeGroups(Intersector &rAI)
const OdGeTol & getExportTol() const
static IEdgeChecker * Create(OperationsExt eOp, Intersector &rAI)
virtual Result CheckFinality(EdgeGroup &) const =0
OdUInt32 setHotID(OdUInt32 uID)
void resize(OdUInt32 uNewSize)
const IContour2D & contour(OdUInt32 uIndex) const
Contour(const IContour2D &rC, OdUInt32 uCID, OdUInt32 uGID, bool bReversed=false, bool bForceCopy=false)
void addEdge(int eDir, Edge *pEdge)
Result Regularize(const Profile2D &rSource, Profile2D &rDest, bool bValidateNesting=false, InfinityLocation eIL=eilOutside, const OdGeTol &gTol=FMGeGbl::gTol)
virtual Result CheckFinality(Edge &) const =0
static bool areCoincident(const Edge &rEdgeA, const Edge &rEdgeB, bool *pbCoDirectional=0, const OdGeTol &gTol=FMGeGbl::gTol)
OdUInt32 getGroupIdxByPriority(OdUInt32 iIdx) const
Locations getLocation(const OdGePoint2d &ptTest, const OdGeTol gTol) const
Result addProfile(OdUInt32 uGroup, const Profile2D &rProfile, bool bReversed=false, bool bForceCopy=false)
OdUInt32 getHotID() const
OdUInt32 unsetFlag(OdUInt32 uFlag)