CFx SDK Documentation  2020SP3
FMImpProfile2DBool.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2015, Open Design Alliance (the "Alliance").
3 // All rights reserved.
4 //
5 // This software and its documentation and related materials are owned by
6 // the Alliance. The software may only be incorporated into application
7 // programs owned by members of the Alliance, subject to a signed
8 // Membership Agreement and Supplemental Software License Agreement with the
9 // Alliance. The structure and organization of this software are the valuable
10 // trade secrets of the Alliance and its suppliers. The software is also
11 // protected by copyright law and international treaty provisions. Application
12 // programs incorporating this software must include the following statement
13 // with their copyright notices:
14 //
15 // This application incorporates Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2015 by Open Design Alliance.
18 // All rights reserved.
19 //
20 // By use of this software, its documentation or related materials, you
21 // acknowledge and accept the above terms.
23 #ifndef __FM_IMP_PROFILE2D_BOOL_H__
24 #define __FM_IMP_PROFILE2D_BOOL_H__
25 
26 
27 #include "FMProfile2DBool.h"
28 
30 
32 #include "Contours/FM_IContour2D.h"
33 
35 
36 #include "FMContour2D.h"
37 #include "FMProfile2D.h"
38 
40 
41 using namespace FacetModeler;
42 
44 {
45  class Intersector;
46  class Node;
47  class Edge;
48  class EdgeGroup;
49 
51  {
57 
58  eoRegularize = (Profile2DBool::eoLastOper+1), // regularization of a single argument
59  //eoRegularizeTest, // regularization for the testing purposes
60 
61  eoFlagSetting, // set flags on the first argument WRT another args
62 
63  eoOpsMask = 0xFF,
64 
65  // Argument types
66  eoLinear = 0x100,
67  eoRegional = 0x200,
69  eoArgMask = 0xF00,
70 
71  // additional stuff
72  eoLinRegNoBoundary = 0x1000 // region boundary is not included in cutting region
73  };
74 
75 
77  {
81  //eilBySummaryArea
82  };
83 
85  {
87  erfIntersections = 0x01, // some bounds touch each other at least at one point
88  erfSticking = 0x02, // some bounds have coincident parts
89  erfCounterSticking = 0x04, // some bounds have coincident parts with opposite directions
90  erfWrongBounds = 0x08, // some bounds are not included in regularized profile
91  erfWrongNesting = 0x10, // some sub-regions have incorrect orientation
92  erfUnknownError = 0x100,// some error happened in regularization
93  erfAllFlags = 0xFFF
94  };
95 
96 #undef min
97  template< class T >
98  inline const T& min(const T& x, const T& y)
99  {
100  return (x<=y ? x : y );
101  }
102 
103 #undef max
104  template< class T >
105  inline const T& max(const T& x, const T& y)
106  {
107  return (x>=y ? x : y );
108  }
109 
110 
111 
112  class Contour
113  {
114  public:
115  Contour( const IContour2D & rC, OdUInt32 uCID, OdUInt32 uGID, bool bReversed = false, bool bForceCopy = false );
116  void Done( );
117 
118  // reset nodes and flags. Keep source contours
119  void resetNodes();
120 
121  inline const IContour2D & contour2D() const { return *pContour; };
122  inline OdUInt32 id() const { return uContourID; };
123  inline OdUInt32 groupId() const { return uGroupID; };
124 
125  inline bool isReversed () const { return m_bReversed; };
126 
127  void addNode ( Node * pNode, double dParam );
128  Result createEdges( Intersector & rAI, bool bStoreEdges = false );
129 
130  int getSign() const;
131 
132  Locations getLocation( const OdGePoint2d & ptTest, const OdGeTol gTol ) const;
133 
134  inline const std::vector< Edge* >& getEdges() const { return m_vecEdges; };
135 
136  private:
137  OdUInt32 uContourID; // ID of the contour
138  OdUInt32 uGroupID; // Group ID
139  const IContour2D * pContour; // Contour ( original or a caching copy of original )
140  const IContour2D * pOrigContour; // Original contour
141  bool m_bReversed;
142 
143  std::vector< std::pair< double, Node * > > m_vecNodes;
144 
145  // this member is not empty, if bStoreEdges was true in createEdges call
146  std::vector< Edge* > m_vecEdges;
147  };
148 
149  class Group
150  {
151  public:
152  enum GroupTypes {
153  egtUnknown = 0,
154  egtLines = 0x10,
155  egtLinesWithDirection = egtLines | 0x01,
156  egtRegion = 0x20,
157  egtRegionNormal = egtRegion,
158  egtRegionPositive = egtRegion | 0x01,
159  egtRegionOrdered = egtRegion | 0x02,
160  //egtNegative = 0x80,
161  egtLastType
162  };
163 
164 
165  Group( Intersector & rAI, GroupTypes eT, OdUInt32 uPri, OdUInt32 uFirst = 0, OdUInt32 uSize = 0 );
166 
167  inline GroupTypes type() const { return m_eType; };
168  inline OdUInt32 priority() const { return m_uPriority; };
169 
170  inline OdUInt32 size() const { return m_uSize; };
171  inline OdUInt32 firstIdx() const { return m_uFirst; };
172  inline OdUInt32 nextIdx() const { return m_uFirst + m_uSize; };
173 
174  const IContour2D & contour( OdUInt32 uIndex ) const;
175 
176  inline Intersector & intersector() const { return *m_pAI; };
177 
178  void resize( OdUInt32 uNewSize );
179 
180  // validate contours and initialize some cached values
182 
183  Locations getLocation( const OdGePoint2d & ptTest, const OdGeTol gTol ) const;
184 
185  private:
186  OdUInt32 m_uFirst;
187  OdUInt32 m_uSize;
188 
189  OdUInt32 m_uPriority;
190  GroupTypes m_eType;
191 
192  // elInside or elOutside - location of point which is not contained by the contours
193  // (i.e. "infinity" point)
194  Locations m_eInfinityLocation;
195 
196  Intersector * m_pAI;
197  };
198 
199 
200 
201  class Node
202  {
203  public:
204  Node( ) : m_uHotID(0) { };
205  Node( const OdGePoint2d & ptC )
206  : m_ptCenter( ptC ), m_uHotID(0) { };
207 
209  eOutEdge = 0,
210  eInEdge = 1,
211  eEdgeDirs
212  };
213 
214  void addEdge( int eDir, Edge * pEdge );
215 
218 
219  void updateFinalEdges( bool bReorderByAngle, double dTgStep );
220 
221  typedef std::pair< EdgeDirection, Edge * > EdgeLink;
222 
223  inline OdUInt32 edgeCount( ) const { return (OdUInt32)m_vecEdges.size(); };
224 
225  inline const EdgeLink & edgeLink ( OdUInt32 iIndex ) const { return m_vecEdges[iIndex]; };
226 
227  // HotIDs are used during export to simplify check, whether we`ve just passed the node
228  inline OdUInt32 getHotID() const { return m_uHotID; };
229  inline OdUInt32 setHotID(OdUInt32 uID) { return m_uHotID = uID; };
230 
231  //Edge * findNeighbour( const Edge * pEdge, EdgeDirection eEdgeDir, EdgeDirection eNeighbourDir, bool bCCW = false ) const;
232 
233  Edge * findFinalRegionalNeighbour( const Edge * pEdge, EdgeDirection eEdgeDir, EdgeDirection eNeighbourDir, bool bCCW = false ) const;
234  Edge * findFinalEdge( EdgeDirection eEdgeDir ) const;
235 
236  void reverseFinalEdge( OdUInt32 iIndex );
237 
238  private:
239  OdGePoint2d m_ptCenter;
240 
241  OdUInt32 m_uHotID;
242 
243  std::vector< EdgeLink > m_vecEdges;
244  };
245 
246 
247 
248  class Edge
249  {
250  public:
251  Edge( const Contour & rC, double dStartP, double dEndP );
252 
254  eStartNode = 0,
255  eEndNode = 1,
256  eNodePositions
257  };
258 
259  inline const Contour & contour( ) const { return *m_pContour; };
260  inline OdUInt32 regionId() const { return m_pContour->groupId(); };
261 
262  Edge & setNode( OdUInt32 ePos, Node * pNode, OdUInt32 iIndex );
263 
264  inline double param( int ePos ) const { return m_aParams[ePos]; };
265  inline Node * node ( int ePos ) const { return m_aNodes[ePos]; };
266  inline Node * anotherNode( int ePos ) const { return m_aNodes[ ePos^1 ]; };
267 
268  double tangentAt( int ePos, double dStep ) const;
269 
271 
272  inline OdUInt32 indexInNode( int ePos ) const { return m_aIndices[ePos]; };
273 
274  const OdGePoint2d& middlePoint() const;
275 
276  inline EdgeGroup * edgeGroup() const { return m_pEdgeGroup; };
277  Edge & setEdgeGroup( EdgeGroup * pGroup, OdUInt32 iIndex );
278 
279  static bool areCoincident( const Edge & rEdgeA, const Edge & rEdgeB, bool * pbCoDirectional = 0, const OdGeTol & gTol = FMGeGbl::gTol );
280  static EdgeGroup * GroupEdges( Intersector & rAI, Edge & rEdgeA, Edge & rEdgeB, bool bCoDirectional );
281 
282 
283  enum Flags {
284  efSourceReversed = 0x01,
285  efChecked = 0x02, // finality was checked
286  efHot = 0x04, // the edge is a candidate for export
287  //efDone = 0x04,
288  efFinal = 0x10,
289  efFinalReversed = 0x20,
290  efFinalDone = 0x40
291  };
292 
293  inline bool isFinal() const { return 0 != (m_uFlags & efFinal); };
294 
295  inline OdUInt32 setFlag( OdUInt32 uFlag ) { return m_uFlags |= uFlag; };
296  inline OdUInt32 unsetFlag( OdUInt32 uFlag ) { return m_uFlags &= ~uFlag; };
297  inline OdUInt32 getFlag( OdUInt32 uFlag ) const { return m_uFlags & uFlag; };
298 
299  Edge * getNextFinalRegional( bool bContoursCCW = true ) const;
300  Edge * getPrevFinalRegional( bool bContoursCCW = true ) const;
301 
302  Edge * getNextFinalLinear( bool bStopAtJunctions = false ) const;
303 
304  private:
305  Node * m_aNodes[ eNodePositions ];
306  OdUInt32 m_aIndices[ eNodePositions ];
307 
308  double m_aParams[ eNodePositions ];
309  const Contour * m_pContour;
310 
311  mutable OdGePoint2d m_ptMiddle;
312 
313  EdgeGroup * m_pEdgeGroup;
314 
315  OdUInt32 m_uFlags;
316  };
317 
318 
319  class EdgeGroup
320  {
321  public:
322  EdgeGroup( Edge * pFirstEdge, Edge * pSecondEdge = 0 );
323 
324  EdgeGroup & addEdge( Edge * pEdge );
325  EdgeGroup & merge( EdgeGroup * pGroup2 );
326 
327  inline OdUInt32 size() const { return (OdUInt32)m_vecEdges.size(); };
328  inline Edge * edge( OdUInt32 iIndex ) { return m_vecEdges[iIndex]; };
329 
330  EdgeGroup & setFlags( OdUInt32 uFlags, OdUInt32 uUnsetFirst = 0 );
331 
332  inline bool isHandled() const { return m_bHandled; };
333 
334  const OdGePoint2d& middlePoint() const;
335 
336  //EdgeGroup & sortByRegionNode();
337 
338  private:
339  std::vector< Edge * > m_vecEdges;
340  bool m_bHandled;
341  };
342 
343 
344 
345  // This interface updates final/checked flags in edges and edge groups.
347  {
348  public:
349  virtual ~IEdgeChecker() { };
350 
351  // this static method creates a new EdgeChecker, corresponding to eOp
352  // or returns 0, if the operation is not valid
354 
355  virtual Result CheckFinality( Edge & ) const = 0;
356 
357  virtual Result CheckFinality( EdgeGroup & ) const = 0;
358  };
359 
360 
361  class EdgeInfoImpl;
362 
363 
365  {
366  public:
369 
371  //
372  // Some simple user-friendly methods:
373  //
374 
375  Result Regularize( const Profile2D& rSource, Profile2D& rDest,
376  bool bValidateNesting = false,
378  const OdGeTol & gTol = FMGeGbl::gTol );
379 
380  // fills in riRegularityFlags
381  Result TestRegularity( const Profile2D& rSource,
382  int& riRegularityFlags,
383  int iInterestingFlags = erfAllFlags,
385  const OdGeTol & gTol = FMGeGbl::gTol );
386 
388  const Profile2D &rArg1,
389  const Profile2D &rArg2,
390  Profile2D &rResult,
391  const OdGeTol & gTol = FMGeGbl::gTol );
392 
394  const Profile2D& rArg1,
395  const Profile2D& rArg2,
396  Profile2D& rResult );
397 
399 
400  //Result InitOperation( OperationsExt eOper, const OdGeTol & gTol = FMGeGbl::gTol );
401 
402 
403 
405  //
406  // Low-level methods. Do not use if not sure WYAD.
407 
408 
410  // initialization
411 
412  void reset( const OdGeTol & gTol = FMGeGbl::gTol );
413 
414  void reserve( OdUInt32 uGroups, OdUInt32 uContours );
415 
416  // returns group index or OdUInt(-1)
417  OdUInt32 addGroup( Group::GroupTypes eT, OdUInt32 uPriority = 0, OdUInt32 uReservedSize = 0 );
418 
419  // add contours to some group ( Fails, if uGroup != last addGroup result !!! )
420  Result addContour( OdUInt32 uGroup, const IContour2D & rContour, bool bReversed = false, bool bForceCopy = false );
421 
422  // add profile to some group ( Fails, if uGroup != last addGroup result !!! )
423  Result addProfile( OdUInt32 uGroup, const Profile2D & rProfile, bool bReversed = false, bool bForceCopy = false );
424 
425  // tries to perform operation on existing groups/contours
426  // result is stored in member variable and can be obtained via getResult();
428 
429 
430  // Flag-setting operations.
431  // The result of this operation contains contours of the first group with
432  // some additional vertices and updated metadata.
433  // ToDo: more comments
434  Result evaluateFlags( const IFlagSetter& rFlagSetter );
435 
436 
437  // returns resulting profile from the last "evaluate"
438  // use moveResultTo instead to avoid contour copying
439  inline const Profile2D& getResult( ) const { return m_cDestProfile; };
440  inline void moveResultTo( Profile2D & rDest ) { rDest.clear(); m_cDestProfile.swap( rDest ); };
441 
443 
444  inline OdUInt32 numContours() const { return (OdUInt32)m_vecContours.size(); };
445  const Contour & getContour( OdUInt32 uContourID ) const;
446 
447  inline OdUInt32 numGroups() const { return (OdUInt32)m_vecGroups.size(); };
448  const Group & getGroup( OdUInt32 uGroupIdx ) const;
449 
450  // returns group indexes ordered by priority
452  { return iIdx; };
453 
454  inline const OdGeTol & getTol() const { return m_gTol; };
455  inline const OdGeTol & getPairTol() const { return m_gPairTol; };
456  inline const OdGeTol & getMergeTol() const { return m_gMergeTol; };
457  inline const OdGeTol & getExportTol() const { return m_gEdgeExportTol; };
458 
459  inline const IEdgeChecker & getChecker() const { return *m_pEdgeChecker; };
460 
462 
463  // adds node to Intersector`s node list
464  Node * addNode( Node * pNode );
465 
466  // adds edge to Intersector`s edge list
467  Edge * addEdge( Edge * pEdge );
468 
469  // adds edgegroup to Intersector`s edgegroup list
470  EdgeGroup * addEdgeGroup( EdgeGroup * pEdgeGroup );
471 
472  inline void setRegularityFlags( int iFlags ) { m_iRegularityFlags|=iFlags; };
473 
474  private:
475 
476  std::vector< Contour > m_vecContours;
477  std::vector< Group > m_vecGroups;
478 
479  std::vector< Node * > m_vecNodes;
480  std::vector< Edge * > m_vecEdges;
481  std::vector< EdgeGroup * > m_vecEdgeGroups;
482 
483  int m_iRegularityFlags;
484 
486  //
487  OperationsExt m_eCurrOper;
488 
489  //
490  Profile2D m_cDestProfile;
491 
492  IEdgeChecker * m_pEdgeChecker;
493 
494 
495  // tolerances
496  OdGeTol m_gTol;
497  OdGeTol m_gPairTol;
498  OdGeTol m_gMergeTol;
499  double m_dTgStep;
500  OdGeTol m_gEdgeExportTol;
501  void initTolerance ( const OdGeTol & gTol );
502 
503  // Reset all intermediate data. Keep source groups and contours
504  void resetIntermediate();
505 
506  // Reset resulting profile and operation code
507  void resetResult();
508 
509  // validates operation and groups/contours.
510  // Returns error, if the operation is not valid
511  Result validateArgs( OperationsExt eOper );
512 
514  private:
515 
516  // Stage 1: find all crossings using ContourIntersector
517  Result FindCrossings( std::vector< Crossing > & vecCrossings );
518 
519  // Stage 2: convert crossings to nodes and arrange the nodes on contours
520  Result CreateNodes( const std::vector< Crossing > & vecCrossings );
521 
522  // Stage 3: split contours into edges, connecting the nodes
523  Result CreateEdges( bool bStoreEdges = false, bool bStoreFirstGroupOnly = false );
524 
525  // Stage 4: find coincident edges and create groups
526  Result CreateEdgeGroups( );
527 
528  // Stage 5: find and verify final edges, depending on operation type
529  Result FindFinalEdges( );
530 
531  // Stage 6: create final contours from final edges
532  Result CreateFinalContours();
533 
534  Result CreateFinalContoursClosed( Profile2D & rDest, OdUInt32 & uHotID );
535  Result CreateFinalContoursOpen ( Profile2D & rDest, OdUInt32 & uHotID );
536 
537  Result GenerateFinalContour( const std::vector<Edge*> & vecEdges, IContour2D & rDestC2D, bool bClosed );
538 
539  // Stage 5F: create final contours with modified metadata
540  Result CreateFlaggedResult( const IFlagSetter& rFlagSetter );
541 
542  // remove empty/collapsed contours and improperly nested ones
543  // returns erOk or erWarn*, if some contours in the source profile should be removed
544  // pvecValid contains indexes of valid contours in the source profile
545  // the indexes are ordered by contour area (the first is the biggest)
546  // pvecResults contains status for each contour ( erOk for valid ones )
547  // Note: contours MUST NOT intersect. However, the contours can have common bounds
548  Result ValidateNesting( const Profile2D & rSource,
549  std::vector<OdUInt32> * pvecValid = 0,
550  std::vector<Result> * pvecResults = 0,
552  ) const;
553 
554  // remove empty/collapsed contours and improperly nested ones
555  // Note: contours MUST NOT intersect. However, the contours can have common bounds
556  // Note: rSource can be equal to *pDest
557  // Returns erOk, erWarnImproperAreas, erWarnSmallContour, erWarnEmptyContour or some
558  // error code.
559  Result RegularizeNesting( const Profile2D & rSource, Profile2D * pDest = 0, Profile2D * pRemoved = 0, InfinityLocation eIL = eilOutside );
560 
561  }; // class Intersector
562 
563 
564 
565 
566 }; // namespace FacetModelerProfile2DBool
567 
568 #endif //__FM_IMP_PROFILE2D_BOOL_H__
FacetModeler::FMGeGbl::gTol
static FMGEOMETRY_API_STATIC OdGeTol gTol
Definition: FMGeometry.h:156
FacetModelerProfile2DBool::eoSUB
@ eoSUB
Definition: FMImpProfile2DBool.h:55
FacetModelerProfile2DBool::Intersector::getPairTol
const OdGeTol & getPairTol() const
Definition: FMImpProfile2DBool.h:455
FM_IBulgeSeg2D.h
FacetModelerProfile2DBool::eilInside
@ eilInside
Definition: FMImpProfile2DBool.h:79
FacetModelerProfile2DBool::Node::Node
Node(const OdGePoint2d &ptC)
Definition: FMImpProfile2DBool.h:205
FacetModelerProfile2DBool::Intersector
Definition: FMImpProfile2DBool.h:365
FacetModelerProfile2DBool::EdgeGroup::isHandled
bool isHandled() const
Definition: FMImpProfile2DBool.h:332
FacetModelerProfile2DBool::Group::GroupTypes
GroupTypes
Definition: FMImpProfile2DBool.h:152
FacetModelerProfile2DBool::Intersector::getGroup
const Group & getGroup(OdUInt32 uGroupIdx) const
FacetModelerProfile2DBool::Intersector::setRegularityFlags
void setRegularityFlags(int iFlags)
Definition: FMImpProfile2DBool.h:472
FacetModelerProfile2DBool::Edge::contour
const Contour & contour() const
Definition: FMImpProfile2DBool.h:259
FacetModelerProfile2DBool::Edge::GroupEdges
static EdgeGroup * GroupEdges(Intersector &rAI, Edge &rEdgeA, Edge &rEdgeB, bool bCoDirectional)
FacetModelerProfile2DBool::Intersector::getContour
const Contour & getContour(OdUInt32 uContourID) const
FacetModelerProfile2DBool::Edge::setEdgeGroup
Edge & setEdgeGroup(EdgeGroup *pGroup, OdUInt32 iIndex)
FacetModelerProfile2DBool::Node::findFinalRegionalNeighbour
Edge * findFinalRegionalNeighbour(const Edge *pEdge, EdgeDirection eEdgeDir, EdgeDirection eNeighbourDir, bool bCCW=false) const
FacetModeler
Definition: FMContour2D.h:35
FacetModelerProfile2DBool::erfIntersections
@ erfIntersections
Definition: FMImpProfile2DBool.h:87
FacetModelerProfile2DBool::Edge::setFlag
OdUInt32 setFlag(OdUInt32 uFlag)
Definition: FMImpProfile2DBool.h:295
FacetModelerProfile2DBool::Contour::createEdges
Result createEdges(Intersector &rAI, bool bStoreEdges=false)
FMProfile2D.h
FacetModeler::Profile2DBool::eoUnknown
@ eoUnknown
Definition: FMProfile2DBool.h:64
FacetModelerProfile2DBool::Edge::anotherNode
Node * anotherNode(int ePos) const
Definition: FMImpProfile2DBool.h:266
FacetModelerProfile2DBool::Intersector::getChecker
const IEdgeChecker & getChecker() const
Definition: FMImpProfile2DBool.h:459
FacetModelerProfile2DBool::EdgeGroup::EdgeGroup
EdgeGroup(Edge *pFirstEdge, Edge *pSecondEdge=0)
FacetModelerProfile2DBool::EdgeGroup::edge
Edge * edge(OdUInt32 iIndex)
Definition: FMImpProfile2DBool.h:328
FacetModelerProfile2DBool::IEdgeChecker::~IEdgeChecker
virtual ~IEdgeChecker()
Definition: FMImpProfile2DBool.h:349
FacetModelerProfile2DBool::Node::reverseFinalEdge
void reverseFinalEdge(OdUInt32 iIndex)
FacetModelerProfile2DBool::Intersector::addEdge
Edge * addEdge(Edge *pEdge)
FacetModelerProfile2DBool::Edge::getPrevFinalRegional
Edge * getPrevFinalRegional(bool bContoursCCW=true) const
FacetModelerProfile2DBool::Group::priority
OdUInt32 priority() const
Definition: FMImpProfile2DBool.h:168
FacetModelerProfile2DBool::eoUnknown
@ eoUnknown
Definition: FMImpProfile2DBool.h:52
FacetModeler::Locations
Locations
Definition: FMContoursBase.h:176
FacetModelerProfile2DBool::Node::findFinalEdge
Edge * findFinalEdge(EdgeDirection eEdgeDir) const
FacetModelerProfile2DBool::Intersector::TestRegularity
Result TestRegularity(const Profile2D &rSource, int &riRegularityFlags, int iInterestingFlags=erfAllFlags, InfinityLocation eIL=eilByBiggestArea, const OdGeTol &gTol=FMGeGbl::gTol)
FacetModelerProfile2DBool::min
const T & min(const T &x, const T &y)
Definition: FMImpProfile2DBool.h:98
FacetModeler::Profile2DBool::eoSUB
@ eoSUB
Definition: FMProfile2DBool.h:67
FacetModelerProfile2DBool::erfWrongNesting
@ erfWrongNesting
Definition: FMImpProfile2DBool.h:91
FacetModelerProfile2DBool::Node::updateEdgeIndices
void updateEdgeIndices()
FacetModelerProfile2DBool::Intersector::addGroup
OdUInt32 addGroup(Group::GroupTypes eT, OdUInt32 uPriority=0, OdUInt32 uReservedSize=0)
FacetModelerProfile2DBool::Contour::Done
void Done()
FacetModelerProfile2DBool::Edge::NodePosition
NodePosition
Definition: FMImpProfile2DBool.h:253
FacetModelerProfile2DBool::Intersector::numGroups
OdUInt32 numGroups() const
Definition: FMImpProfile2DBool.h:447
x
GLfloat x
Definition: gles2_ext.h:314
FacetModelerProfile2DBool::Contour::getSign
int getSign() const
OdUInt32
unsigned int OdUInt32
Definition: OdPlatformSettings.h:783
FacetModelerProfile2DBool::Intersector::Intersector
Intersector()
FacetModelerProfile2DBool::eoAND
@ eoAND
Definition: FMImpProfile2DBool.h:54
FacetModelerProfile2DBool::Group::size
OdUInt32 size() const
Definition: FMImpProfile2DBool.h:170
FacetModelerProfile2DBool::eoLinReg
@ eoLinReg
Definition: FMImpProfile2DBool.h:68
FacetModelerProfile2DBool::erfCounterSticking
@ erfCounterSticking
Definition: FMImpProfile2DBool.h:89
FacetModelerProfile2DBool::Intersector::getMergeTol
const OdGeTol & getMergeTol() const
Definition: FMImpProfile2DBool.h:456
FacetModelerProfile2DBool::Contour::getEdges
const std::vector< Edge * > & getEdges() const
Definition: FMImpProfile2DBool.h:134
FacetModelerProfile2DBool::Intersector::addContour
Result addContour(OdUInt32 uGroup, const IContour2D &rContour, bool bReversed=false, bool bForceCopy=false)
FacetModelerProfile2DBool::Edge::getNextFinalLinear
Edge * getNextFinalLinear(bool bStopAtJunctions=false) const
FacetModelerProfile2DBool::Node::edgeLink
const EdgeLink & edgeLink(OdUInt32 iIndex) const
Definition: FMImpProfile2DBool.h:225
FacetModelerProfile2DBool::Contour::resetNodes
void resetNodes()
FacetModelerProfile2DBool::erfUnknownError
@ erfUnknownError
Definition: FMImpProfile2DBool.h:92
FacetModelerProfile2DBool::Intersector::TryFastPerformOperation
static bool TryFastPerformOperation(BooleanOperation eType, const Profile2D &rArg1, const Profile2D &rArg2, Profile2D &rResult)
FacetModelerProfile2DBool::Node::EdgeDirection
EdgeDirection
Definition: FMImpProfile2DBool.h:208
FacetModelerProfile2DBool::Intersector::PerformOperation
Result PerformOperation(BooleanOperation eType, const Profile2D &rArg1, const Profile2D &rArg2, Profile2D &rResult, const OdGeTol &gTol=FMGeGbl::gTol)
FMContoursBaseImp.h
FacetModelerProfile2DBool::Edge::getNextFinalRegional
Edge * getNextFinalRegional(bool bContoursCCW=true) const
FacetModelerProfile2DBool::Edge::Edge
Edge(const Contour &rC, double dStartP, double dEndP)
FacetModelerProfile2DBool::Group::intersector
Intersector & intersector() const
Definition: FMImpProfile2DBool.h:176
FacetModelerProfile2DBool::Edge::regionId
OdUInt32 regionId() const
Definition: FMImpProfile2DBool.h:260
FacetModelerProfile2DBool::Intersector::evaluateFlags
Result evaluateFlags(const IFlagSetter &rFlagSetter)
FacetModelerProfile2DBool::Group::nextIdx
OdUInt32 nextIdx() const
Definition: FMImpProfile2DBool.h:172
FacetModeler::IContour2D
Definition: FM_IContour2D.h:38
FacetModelerProfile2DBool::Group::Group
Group(Intersector &rAI, GroupTypes eT, OdUInt32 uPri, OdUInt32 uFirst=0, OdUInt32 uSize=0)
FacetModelerProfile2DBool::Intersector::numContours
OdUInt32 numContours() const
Definition: FMImpProfile2DBool.h:444
FacetModelerProfile2DBool::InfinityLocation
InfinityLocation
Definition: FMImpProfile2DBool.h:77
FacetModelerProfile2DBool::Edge::getFlag
OdUInt32 getFlag(OdUInt32 uFlag) const
Definition: FMImpProfile2DBool.h:297
FacetModelerProfile2DBool::Intersector::getTol
const OdGeTol & getTol() const
Definition: FMImpProfile2DBool.h:454
FacetModelerProfile2DBool::Edge::middlePoint
const OdGePoint2d & middlePoint() const
FacetModelerProfile2DBool::IEdgeChecker
Definition: FMImpProfile2DBool.h:347
FacetModelerProfile2DBool::Intersector::moveResultTo
void moveResultTo(Profile2D &rDest)
Definition: FMImpProfile2DBool.h:440
FacetModelerProfile2DBool::Edge::isFinal
bool isFinal() const
Definition: FMImpProfile2DBool.h:293
y
GLfloat GLfloat y
Definition: gles2_ext.h:316
FacetModelerProfile2DBool::Contour::getLocation
Locations getLocation(const OdGePoint2d &ptTest, const OdGeTol gTol) const
FacetModeler::Edge
Definition: FMMdlEdge.h:43
FacetModelerProfile2DBool::Group::validateGroup
Result validateGroup()
FMProfile2DBool.h
FacetModelerProfile2DBool::Intersector::reserve
void reserve(OdUInt32 uGroups, OdUInt32 uContours)
FacetModelerProfile2DBool::Edge::setNode
Edge & setNode(OdUInt32 ePos, Node *pNode, OdUInt32 iIndex)
FacetModelerProfile2DBool::erfSticking
@ erfSticking
Definition: FMImpProfile2DBool.h:88
FacetModelerProfile2DBool::Contour::groupId
OdUInt32 groupId() const
Definition: FMImpProfile2DBool.h:123
FacetModelerProfile2DBool::max
const T & max(const T &x, const T &y)
Definition: FMImpProfile2DBool.h:105
FacetModelerProfile2DBool::eoOpsMask
@ eoOpsMask
Definition: FMImpProfile2DBool.h:63
FacetModelerProfile2DBool::Node::updateFinalEdges
void updateFinalEdges(bool bReorderByAngle, double dTgStep)
FMContour2D.h
FacetModelerProfile2DBool::Edge::reverseFinalEdge
void reverseFinalEdge()
FacetModelerProfile2DBool::Node::EdgeLink
std::pair< EdgeDirection, Edge * > EdgeLink
Definition: FMImpProfile2DBool.h:221
FacetModelerProfile2DBool::Edge::indexInNode
OdUInt32 indexInNode(int ePos) const
Definition: FMImpProfile2DBool.h:272
FacetModeler::Profile2DBool::eoXOR
@ eoXOR
Definition: FMProfile2DBool.h:68
FacetModelerProfile2DBool::Intersector::addNode
Node * addNode(Node *pNode)
FacetModeler::Profile2DBool::eoLastOper
@ eoLastOper
Definition: FMProfile2DBool.h:69
FacetModelerProfile2DBool::eoArgMask
@ eoArgMask
Definition: FMImpProfile2DBool.h:69
FacetModeler::Profile2D::clear
void clear()
FacetModelerProfile2DBool::Node::edgeCount
OdUInt32 edgeCount() const
Definition: FMImpProfile2DBool.h:223
FacetModelerProfile2DBool::Intersector::evaluate
Result evaluate(OperationsExt eOp)
FacetModelerProfile2DBool::eoRegional
@ eoRegional
Definition: FMImpProfile2DBool.h:67
FacetModelerProfile2DBool::Intersector::addEdgeGroup
EdgeGroup * addEdgeGroup(EdgeGroup *pEdgeGroup)
FacetModelerProfile2DBool::eilByBiggestArea
@ eilByBiggestArea
Definition: FMImpProfile2DBool.h:80
FacetModelerProfile2DBool::Edge
Definition: FMImpProfile2DBool.h:249
FacetModelerProfile2DBool::Contour::addNode
void addNode(Node *pNode, double dParam)
FMP2DBEdgeFlags.h
FM_IContour2D.h
FacetModelerProfile2DBool::eoOR
@ eoOR
Definition: FMImpProfile2DBool.h:53
FacetModelerProfile2DBool::Intersector::~Intersector
~Intersector()
FacetModeler::Result
Result
Definition: FMContoursBase.h:44
FacetModelerProfile2DBool::EdgeGroup::middlePoint
const OdGePoint2d & middlePoint() const
FacetModelerProfile2DBool::Edge::edgeGroup
EdgeGroup * edgeGroup() const
Definition: FMImpProfile2DBool.h:276
FacetModelerProfile2DBool::erfDefault
@ erfDefault
Definition: FMImpProfile2DBool.h:86
FacetModelerProfile2DBool::eoRegularize
@ eoRegularize
Definition: FMImpProfile2DBool.h:58
FacetModelerProfile2DBool::eoLinRegNoBoundary
@ eoLinRegNoBoundary
Definition: FMImpProfile2DBool.h:72
FacetModelerProfile2DBool::EdgeGroup::setFlags
EdgeGroup & setFlags(OdUInt32 uFlags, OdUInt32 uUnsetFirst=0)
FacetModelerProfile2DBool::Edge::Flags
Flags
Definition: FMImpProfile2DBool.h:283
FacetModelerProfile2DBool::Edge::node
Node * node(int ePos) const
Definition: FMImpProfile2DBool.h:265
FacetModelerProfile2DBool::Intersector::getResult
const Profile2D & getResult() const
Definition: FMImpProfile2DBool.h:439
FacetModelerProfile2DBool::EdgeGroup::merge
EdgeGroup & merge(EdgeGroup *pGroup2)
FacetModelerProfile2DBool::Intersector::reset
void reset(const OdGeTol &gTol=FMGeGbl::gTol)
FacetModelerProfile2DBool
DOM.
Definition: FMProfile2DBool.h:35
FacetModelerProfile2DBool::RegularityFlags
RegularityFlags
Definition: FMImpProfile2DBool.h:85
FacetModelerProfile2DBool::Edge::param
double param(int ePos) const
Definition: FMImpProfile2DBool.h:264
FacetModelerProfile2DBool::eilOutside
@ eilOutside
Definition: FMImpProfile2DBool.h:78
FacetModelerProfile2DBool::Edge::tangentAt
double tangentAt(int ePos, double dStep) const
FacetModelerProfile2DBool::Group::firstIdx
OdUInt32 firstIdx() const
Definition: FMImpProfile2DBool.h:171
FacetModelerProfile2DBool::Contour::contour2D
const IContour2D & contour2D() const
Definition: FMImpProfile2DBool.h:121
FacetModelerProfile2DBool::EdgeGroup::addEdge
EdgeGroup & addEdge(Edge *pEdge)
FacetModelerProfile2DBool::eoFlagSetting
@ eoFlagSetting
Definition: FMImpProfile2DBool.h:61
FacetModelerProfile2DBool::Node::createEdgeGroups
void createEdgeGroups(Intersector &rAI)
FacetModelerProfile2DBool::Intersector::getExportTol
const OdGeTol & getExportTol() const
Definition: FMImpProfile2DBool.h:457
FacetModelerProfile2DBool::IEdgeChecker::Create
static IEdgeChecker * Create(OperationsExt eOp, Intersector &rAI)
FMContourIntersectors.h
FacetModelerProfile2DBool::Group::type
GroupTypes type() const
Definition: FMImpProfile2DBool.h:167
FacetModelerProfile2DBool::eoLinear
@ eoLinear
Definition: FMImpProfile2DBool.h:66
FacetModelerProfile2DBool::Node::Node
Node()
Definition: FMImpProfile2DBool.h:204
FacetModelerProfile2DBool::IEdgeChecker::CheckFinality
virtual Result CheckFinality(EdgeGroup &) const =0
FacetModelerProfile2DBool::IFlagSetter
Definition: FMP2DBEdgeFlags.h:61
FacetModelerProfile2DBool::Contour
Definition: FMImpProfile2DBool.h:113
FacetModelerProfile2DBool::Node::setHotID
OdUInt32 setHotID(OdUInt32 uID)
Definition: FMImpProfile2DBool.h:229
FacetModeler::Profile2D
Definition: FMProfile2D.h:39
FacetModelerProfile2DBool::Group::resize
void resize(OdUInt32 uNewSize)
FacetModelerProfile2DBool::Group::contour
const IContour2D & contour(OdUInt32 uIndex) const
FacetModelerProfile2DBool::Contour::Contour
Contour(const IContour2D &rC, OdUInt32 uCID, OdUInt32 uGID, bool bReversed=false, bool bForceCopy=false)
FacetModelerProfile2DBool::eoXOR
@ eoXOR
Definition: FMImpProfile2DBool.h:56
FacetModelerProfile2DBool::Node::addEdge
void addEdge(int eDir, Edge *pEdge)
FacetModelerProfile2DBool::EdgeGroup::size
OdUInt32 size() const
Definition: FMImpProfile2DBool.h:327
FacetModelerProfile2DBool::Node
Definition: FMImpProfile2DBool.h:202
FacetModelerProfile2DBool::Intersector::Regularize
Result Regularize(const Profile2D &rSource, Profile2D &rDest, bool bValidateNesting=false, InfinityLocation eIL=eilOutside, const OdGeTol &gTol=FMGeGbl::gTol)
OdGeTol
Definition: GeTol.h:49
FacetModelerProfile2DBool::IEdgeChecker::CheckFinality
virtual Result CheckFinality(Edge &) const =0
FacetModelerProfile2DBool::EdgeGroup
Definition: FMImpProfile2DBool.h:320
FacetModelerProfile2DBool::Edge::areCoincident
static bool areCoincident(const Edge &rEdgeA, const Edge &rEdgeB, bool *pbCoDirectional=0, const OdGeTol &gTol=FMGeGbl::gTol)
FacetModelerProfile2DBool::Contour::isReversed
bool isReversed() const
Definition: FMImpProfile2DBool.h:125
FacetModeler::Profile2DBool::eoOR
@ eoOR
Definition: FMProfile2DBool.h:65
FacetModeler::Profile2DBool::eoAND
@ eoAND
Definition: FMProfile2DBool.h:66
FacetModelerProfile2DBool::Group
Definition: FMImpProfile2DBool.h:150
FacetModeler::BooleanOperation
BooleanOperation
Definition: FMGeometry.h:56
FacetModelerProfile2DBool::Intersector::getGroupIdxByPriority
OdUInt32 getGroupIdxByPriority(OdUInt32 iIdx) const
Definition: FMImpProfile2DBool.h:451
FacetModelerProfile2DBool::Group::getLocation
Locations getLocation(const OdGePoint2d &ptTest, const OdGeTol gTol) const
FacetModelerProfile2DBool::Intersector::addProfile
Result addProfile(OdUInt32 uGroup, const Profile2D &rProfile, bool bReversed=false, bool bForceCopy=false)
FacetModelerProfile2DBool::Contour::id
OdUInt32 id() const
Definition: FMImpProfile2DBool.h:122
FacetModelerProfile2DBool::Node::getHotID
OdUInt32 getHotID() const
Definition: FMImpProfile2DBool.h:228
FacetModelerProfile2DBool::Edge::unsetFlag
OdUInt32 unsetFlag(OdUInt32 uFlag)
Definition: FMImpProfile2DBool.h:296
FacetModelerProfile2DBool::OperationsExt
OperationsExt
Definition: FMImpProfile2DBool.h:51
FacetModelerProfile2DBool::erfWrongBounds
@ erfWrongBounds
Definition: FMImpProfile2DBool.h:90
FacetModelerProfile2DBool::erfAllFlags
@ erfAllFlags
Definition: FMImpProfile2DBool.h:93
OdGePoint2d
Definition: GePoint2d.h:60