23#ifndef __FMGE_CONTOUR_INTERSECTORS_H__
24#define __FMGE_CONTOUR_INTERSECTORS_H__
40 :
Intersection(rI), uContourA(uIDA), uContourB(uIDB) { };
44 :
Intersection(rPt, dPA, dPB, eIT), uContourA( uIDA ), uContourB( uIDB ) { };
101 : uGroupIdx( uG ), uContourIdx( uC ), uSegmentIdx( uS ) { };
122 eNone = 0, eStart,
eEnd, eLastBound
138 inline double value()
const {
return m_dValue; };
155 eIntMiddle2Middle = 0x01,
156 eIntNode2Node = 0x02,
157 eIntNode2Middle = 0x04,
164 eIntSkipZeroLength= 0x20,
217 inline const IContour2D & contour()
const {
return *pContour; };
227 GroupRec() : bSelfIntersecting(
false) { };
231 bool bSelfIntersecting;
232 std::vector< ContourRec > vecContours;
239 std::vector< GroupRec > m_vecGroups;
242 class SegmentCrossing;
244 bool m_bOrderByGroup;
257 void fillSegmentBounds(
const OdGeVector2d& vMainDir, std::vector< SegmentBound1D > & vecBounds,
double dAddTol = 0 )
const;
266 OdUInt32 removeUselessBounds( std::vector< SegmentBound1D > & vecBounds )
const;
268 bool createCrossing( SegmentCrossing & rCross, Crossing & rDest,
const double dTol )
const;
273 bool skipJoints(
const SegmentUID & rUID1,
const SegmentUID & rUID2,
274 IntersectionWithIDs * aIPs,
OdUInt32 iXNum,
const double dZeroTol = -1.0 );
278 OdUInt32 postprocessIntersections(
const SegmentUID & rUID1,
const SegmentUID & rUID2,
279 IntersectionWithIDs * aIPs,
OdUInt32 iXNum );
bool operator<(const OdString &s1, const OdString &s2)
const SegmentUID & segmentUID() const
static bool less(const SegmentBound1D &A, const SegmentBound1D &B)
SegmentBound1D(eBoundType eType, double dValue, OdUInt32 uG, OdUInt32 uC, OdUInt32 uS)
OdUInt32 getAllCrossings(std::vector< Crossing > &vecCrossings, double dMergeTol=0)
OdUInt32 getIntersections(std::vector< IntersectionWithIDs > &vecPoints, bool bOrderByGroups=true)
ContourIntersector(const OdGeTol &gTol=FMGeGbl::gTol)
OdUInt32 addGroup(bool bSelfIntersecting=false, OdUInt32 uReservedContours=0)
OdUInt32 numGroups() const
void reset(const OdGeTol &gTol=FMGeGbl::gTol)
bool hasIntersections(int eLookFor=eIntAny)
void reserveGroups(OdUInt32 iNumGroups)
Result addProfile(const Profile2D &rProfile, OdUInt32 uFirstID, OdUInt32 uGroup=0)
Result addContour(const IContour2D &rContour, OdUInt32 uID, OdUInt32 uGroup=0)
ContourLink(OdUInt32 uID, double dP, double dD)
bool operator<(const ContourLink &rB) const
std::vector< ContourLink > vecLinks
IntersectionWithIDs(const OdGePoint2d &rPt, OdUInt32 uIDA, double dPA, OdUInt32 uIDB, double dPB, Types eIT=eitNone)
IntersectionWithIDs & swapParams()
static bool lessIDParamB(const IntersectionWithIDs &rI1, const IntersectionWithIDs &rI2)
static bool lessIDParamA(const IntersectionWithIDs &rI1, const IntersectionWithIDs &rI2)
IntersectionWithIDs(const Intersection &rI, OdUInt32 uIDA, OdUInt32 uIDB)
SegmentUID(OdUInt32 uG, OdUInt32 uC, OdUInt32 uS)