| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| #ifndef LC_DIVISION_H |
| #define LC_DIVISION_H |
| #include <QVector> |
|
|
| #include "rs_vector.h" |
|
|
| class RS_Line; |
| class RS_Circle; |
| class RS_Arc; |
| class RS_EntityContainer; |
| class RS_Entity; |
| class RS_Vector; |
|
|
| class LC_Division{ |
| public: |
| |
| |
| |
| enum SegmentDisposition{ |
| SEGMENT_INSIDE, |
| SEGMENT_TO_START, |
| SEGMENT_TO_END |
| }; |
|
|
| |
| |
| |
| struct LineSegmentData{ |
| SegmentDisposition segmentDisposition; |
| RS_Vector snap; |
| RS_Vector snapSegmentStart; |
| RS_Vector snapSegmentEnd; |
| }; |
|
|
| |
| |
| |
| struct ArcSegmentData{ |
| int segmentDisposition; |
| double snapSegmentStartAngle; |
| double snapSegmentEndAngle; |
| }; |
|
|
| |
| |
| |
| struct CircleSegmentData{ |
| double snapSegmentStartAngle; |
| double snapSegmentEndAngle; |
| }; |
|
|
| LC_Division(RS_EntityContainer *entityContainer); |
|
|
| ArcSegmentData* findArcSegmentBetweenIntersections(RS_Arc* arc, RS_Vector& snap, bool allowEntireArcAsSegment); |
| CircleSegmentData* findCircleSegmentBetweenIntersections(RS_Circle* circle, RS_Vector& snap, bool allowEntireCircleAsSegment); |
| LineSegmentData* findLineSegmentBetweenIntersections(RS_Line* line, RS_Vector& snap, bool allowEntireLine); |
|
|
| LineSegmentData* findLineSegmentEdges(RS_Line* line, RS_Vector& snap, QVector<RS_Vector> intersections, bool allowEntireLinesAsSegment); |
| ArcSegmentData* findArcSegmentEdges(RS_Arc* arc, RS_Vector& snap, const QVector<RS_Vector>& intersections, bool allowEntireArcAsSegment); |
| CircleSegmentData* findCircleSegmentEdges(RS_Circle* circle, RS_Vector& snap, const QVector<RS_Vector>& intersections); |
|
|
| QVector<RS_Vector> collectAllIntersectionsWithEntity(RS_Entity *entity); |
| private: |
| RS_EntityContainer *m_container = nullptr; |
| protected: |
| void addPointsFromSolutionToList(RS_VectorSolutions& sol, QVector<RS_Vector>& result) const; |
| }; |
|
|
| #endif |
|
|