28#ifndef __SHAPE_POLY_SET_H 
   29#define __SHAPE_POLY_SET_H 
   42#include <clipper2/clipper.h> 
   73    typedef std::vector<SHAPE_LINE_CHAIN> 
POLYGON;
 
   90                                 const VECTOR2I& aCenter = { 0, 0 } ) 
override {};
 
 
   94            virtual bool IsSolid()
 const override { 
return true; }
 
   96            virtual bool IsClosed()
 const override { 
return true; }
 
   98            virtual const BOX2I BBox( 
int aClearance = 0 ) 
const override;
 
  104                    case 0: 
return parent->m_vertices[
a];
 
  105                    case 1: 
return parent->m_vertices[
b];
 
  106                    case 2: 
return parent->m_vertices[
c];
 
  107                    default: wxCHECK( 
false, 
VECTOR2I() );
 
 
  118                    default: wxCHECK( 
false, 
SEG() );
 
 
 
  166            if( 
this != &aOther )
 
 
  196            for( 
size_t ii = 0; ii < aTriangles.size(); ii++ )
 
 
 
  270        operator bool()
 const 
 
 
  390        operator bool()
 const 
 
  497                return ( indexDiff == 1 ) || ( indexDiff == (numSeg - 1) );
 
 
 
  557            SHAPE::operator=( aOther );
 
  559            m_polys = std::move( aOther.m_polys );
 
 
  617    bool GetGlobalIndex( VERTEX_INDEX aRelativeIndices, 
int& aGlobalIdx ) 
const;
 
  628    int NewHole( 
int aOutline = -1 );
 
  646    void GetArcs( std::vector<SHAPE_ARC>& aArcBuffer ) 
const;
 
  664    int Append( 
int x, 
int y, 
int aOutline = -1, 
int aHole = -1, 
bool aAllowDuplication = 
false );
 
  670    void Append( 
const VECTOR2I& aP, 
int aOutline = -1, 
int aHole = -1 );
 
  682                std::optional<int> aMaxError = {} );
 
  739    int VertexCount( 
int aOutline = -1, 
int aHole = -1 ) 
const;
 
  748        if( aOutline < 0 || aOutline >= (
int) 
m_polys.size() || 
m_polys[aOutline].size() < 2 )
 
  753        return m_polys[aOutline].size() - 1;
 
 
  780        return Subset( aPolygonIndex, aPolygonIndex + 1 );
 
 
  786        return m_polys[aOutline][aHole + 1];
 
 
  812        return m_polys[aOutline][aHole + 1];
 
 
  853        return Iterate( aOutline, aOutline );
 
 
  863        return Iterate( aOutline, aOutline, 
true );
 
 
  901        return CIterate( aOutline, aOutline );
 
 
  906        return CIterate( aOutline, aOutline, 
true );
 
 
  928            throw( std::out_of_range( 
"aGlobalIndex-th vertex does not exist" ) );
 
 
  957                                             bool aIterateHoles = 
false )
 const 
 
 1066                  bool aSimplify = 
false );
 
 1070        Inflate( -aAmount, aCornerStrategy, aMaxError );
 
 
 1134    const std::string 
Format( 
bool aCplusPlus = 
true ) 
const override;
 
 1137    bool Parse( std::stringstream& aStream ) 
override;
 
 1164    const BOX2I BBox( 
int aClearance = 0 ) 
const override;
 
 1186    bool Collide( 
const SHAPE* aShape, 
int aClearance = 0, 
int* aActual = 
nullptr,
 
 1187                  VECTOR2I* aLocation = 
nullptr ) 
const override;
 
 1207    bool Collide( 
const VECTOR2I& aP, 
int aClearance = 0, 
int* aActual = 
nullptr,
 
 1208                  VECTOR2I* aLocation = 
nullptr ) 
const override;
 
 1228    bool Collide( 
const SEG& aSeg, 
int aClearance = 0, 
int* aActual = 
nullptr,
 
 1229                  VECTOR2I* aLocation = 
nullptr ) 
const override;
 
 1242                        int aClearance = 0 ) 
const;
 
 1255                      int aClearance = 0 ) 
const;
 
 1258                      bool aUseBBoxCache = 
false ) 
const override;
 
 1280    bool Contains( 
const VECTOR2I& aP, 
int aSubpolyIndex = -1, 
int aAccuracy = 0,
 
 1281                   bool aUseBBoxCaches = 
false ) 
const;
 
 1314    void RemoveContour( 
int aContourIdx, 
int aPolygonIdx = -1 );
 
 1472                                        bool aEvenOdd = 
false );
 
 1480    const std::vector<SEG> 
GenerateHatchLines( 
const std::vector<double>& aSlopes, 
int aSpacing,
 
 1481                                               int aLineLength ) 
const;
 
 1483    void Scale( 
double aScaleFactorX, 
double aScaleFactorY, 
const VECTOR2I& aCenter );
 
 1487                             std::vector<std::unique_ptr<TRIANGULATED_POLYGON>>* aHintData );
 
 1496    void importTree( Clipper2Lib::PolyTree64&            tree,
 
 1497                     const std::vector<CLIPPER_Z_VALUE>& aZValueBuffer,
 
 1498                     const std::vector<SHAPE_ARC>&       aArcBuffe );
 
 1500                     const std::vector<CLIPPER_Z_VALUE>& aZValueBuffer,
 
 1501                     const std::vector<SHAPE_ARC>&       aArcBuffe );
 
 1502    void importPolyPath( 
const std::unique_ptr<Clipper2Lib::PolyPath64>& aPolyPath,
 
 1503                     const std::vector<CLIPPER_Z_VALUE>&                 aZValueBuffer,
 
 1504                     const std::vector<SHAPE_ARC>&                       aArcBuffer );
 
 1549                         bool aUseBBoxCaches = 
false ) 
const;
 
 1576                                  int aIndex, 
int aErrorMax );
 
 
ERROR_LOC
When approximating an arc or circle, should the error be placed on the outside or inside of the curve...
 
VECTOR2I::extended_type ecoord
 
SHAPE_LINE_CHAIN_BASE(SHAPE_TYPE aType)
 
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
 
Base class for iterating over all vertices in a given SHAPE_POLY_SET.
 
bool IsLastPolygon() const
 
void operator++(int dummy)
 
friend class SHAPE_POLY_SET
 
bool IsEndContour() const
 
void Advance()
Advance the indices of the current vertex/outline/contour, checking whether the vertices in the holes...
 
Base class for iterating over all segments in a given SHAPE_POLY_SET.
 
bool IsLastPolygon() const
 
bool IsAdjacent(SEGMENT_ITERATOR_TEMPLATE< T > aOther) const
 
void Advance()
Advance the indices of the current vertex/outline/contour, checking whether the vertices in the holes...
 
friend class SHAPE_POLY_SET
 
void operator++(int dummy)
 
VERTEX_INDEX GetIndex() const
 
size_t GetTriangleCount() const
 
void AddVertex(const VECTOR2I &aP)
 
TRIANGULATED_POLYGON(int aSourceOutline)
 
void GetTriangle(int index, VECTOR2I &a, VECTOR2I &b, VECTOR2I &c) const
 
std::deque< TRI > m_triangles
 
const std::deque< VECTOR2I > & Vertices() const
 
void SetVertices(const std::deque< VECTOR2I > &aVertices)
 
const std::deque< TRI > & Triangles() const
 
std::deque< VECTOR2I > m_vertices
 
size_t GetVertexCount() const
 
int GetSourceOutlineIndex() const
 
TRIANGULATED_POLYGON & operator=(TRIANGULATED_POLYGON &&aOther) noexcept
 
void SetSourceOutlineIndex(int aIndex)
 
void AddTriangle(int a, int b, int c)
 
void SetTriangles(const std::deque< TRI > &aTriangles)
 
TRIANGULATED_POLYGON & operator=(const TRIANGULATED_POLYGON &aOther)
 
void Move(const VECTOR2I &aVec)
 
Represent a set of closed polygons.
 
std::mutex m_triangulationMutex
 
virtual bool HasIndexableSubshapes() const override
 
void Rotate(const EDA_ANGLE &aAngle, const VECTOR2I &aCenter={ 0, 0 }) override
Rotate all vertices by a given angle.
 
void RemoveAllContours()
Remove all outlines & holes (clears) the polygon set.
 
SHAPE_POLY_SET Chamfer(int aDistance)
Return a chamfered version of the polygon set.
 
void RemoveOutline(int aOutlineIdx)
Delete the aOutlineIdx-th outline of the set including its contours and holes.
 
void Scale(double aScaleFactorX, double aScaleFactorY, const VECTOR2I &aCenter)
 
bool CollideEdge(const VECTOR2I &aPoint, VERTEX_INDEX *aClosestVertex=nullptr, int aClearance=0) const
Check whether aPoint collides with any edge of any of the contours of the polygon.
 
virtual void GetIndexableSubshapes(std::vector< const SHAPE * > &aSubshapes) const override
 
void BooleanXor(const SHAPE_POLY_SET &b)
Perform boolean polyset exclusive or.
 
ITERATOR_TEMPLATE< VECTOR2I > ITERATOR
 
void fractureSingle(POLYGON &paths)
 
bool HasHoles() const
Return true if the polygon set has any holes.
 
CONST_ITERATOR CIterateWithHoles() const
 
void BooleanAdd(const SHAPE_POLY_SET &b)
Perform boolean polyset union.
 
ITERATOR IterateWithHoles(int aOutline)
 
ITERATOR IterateWithHoles()
 
void ClearArcs()
Removes all arc references from all the outlines and holes in the polyset.
 
bool IsTriangulationUpToDate() const
 
void importPaths(Clipper2Lib::Paths64 &paths, const std::vector< CLIPPER_Z_VALUE > &aZValueBuffer, const std::vector< SHAPE_ARC > &aArcBuffe)
 
void InsertVertex(int aGlobalIndex, const VECTOR2I &aNewVertex)
Adds a vertex in the globally indexed position aGlobalIndex.
 
CONST_ITERATOR CIterate() const
 
CORNER_MODE
Operation ChamferPolygon and FilletPolygon are computed under the private chamferFillet method; this ...
 
int AddOutline(const SHAPE_LINE_CHAIN &aOutline)
Adds a new outline to the set and returns its index.
 
virtual void CacheTriangulation(bool aPartition=true, bool aSimplify=false)
Build a polygon triangulation, needed to draw a polygon on OpenGL and in some other calculations.
 
int VertexCount(int aOutline=-1, int aHole=-1) const
Return the number of vertices in a given outline/hole.
 
void DeletePolygon(int aIdx)
Delete aIdx-th polygon from the set.
 
void splitCollinearOutlines()
 
double Area()
Return the area of this poly set.
 
void SetVertex(const VERTEX_INDEX &aIndex, const VECTOR2I &aPos)
Accessor function to set the position of a specific point.
 
bool IsEmpty() const
Return true if the set is empty (no polygons at all)
 
CONST_ITERATOR CIterate(int aFirst, int aLast, bool aIterateHoles=false) const
 
void Fracture()
Convert a set of polygons with holes to a single outline with "slits"/"fractures" connecting the oute...
 
bool Collide(const SHAPE *aShape, int aClearance=0, int *aActual=nullptr, VECTOR2I *aLocation=nullptr) const override
Check if the boundary of shape (this) lies closer to the shape aShape than aClearance,...
 
void BuildPolysetFromOrientedPaths(const std::vector< SHAPE_LINE_CHAIN > &aPaths, bool aEvenOdd=false)
Build a SHAPE_POLY_SET from a bunch of outlines in provided in random order.
 
ITERATOR Iterate(int aOutline)
 
bool Parse(std::stringstream &aStream) override
 
int TotalVertices() const
Return total number of vertices stored in the set.
 
CONST_ITERATOR CIterate(int aOutline) const
 
POLYGON & Polygon(int aIndex)
Return the aIndex-th subpolygon in the set.
 
int FullPointCount() const
Return the number of points in the shape poly set.
 
void GetArcs(std::vector< SHAPE_ARC > &aArcBuffer) const
Appends all the arcs in this polyset to aArcBuffer.
 
bool IsVertexInHole(int aGlobalIdx)
Check whether the aGlobalIndex-th vertex belongs to a hole.
 
int NormalizeAreaOutlines()
Convert a self-intersecting polygon to one (or more) non self-intersecting polygon(s).
 
void RemoveVertex(int aGlobalIndex)
Delete the aGlobalIndex-th vertex.
 
void unfractureSingle(POLYGON &path)
 
void inflateLine2(const SHAPE_LINE_CHAIN &aLine, int aAmount, int aCircleSegCount, CORNER_STRATEGY aCornerStrategy, bool aSimplify=false)
 
SEGMENT_ITERATOR IterateSegments(int aPolygonIdx)
Return an iterator object, for iterating aPolygonIdx-th polygon edges.
 
SEGMENT_ITERATOR IterateSegmentsWithHoles(int aOutline)
Return an iterator object, for the aOutline-th outline in the set (with holes).
 
bool GetRelativeIndices(int aGlobalIdx, VERTEX_INDEX *aRelativeIndices) const
Convert a global vertex index —i.e., a number that globally identifies a vertex in a concatenated lis...
 
bool IsPolygonSelfIntersecting(int aPolygonIndex) const
Check whether the aPolygonIndex-th polygon in the set is self intersecting.
 
SHAPE_POLY_SET Subset(int aFirstPolygon, int aLastPolygon)
Return a subset of the polygons in this set, the ones between aFirstPolygon and aLastPolygon.
 
SHAPE_POLY_SET UnitSet(int aPolygonIndex)
 
const POLYGON & Polygon(int aIndex) const
 
int RemoveNullSegments()
Look for null segments; ie, segments whose ends are exactly the same and deletes them.
 
HASH_128 checksum() const
 
void Inflate(int aAmount, CORNER_STRATEGY aCornerStrategy, int aMaxError, bool aSimplify=false)
Perform outline inflation/deflation.
 
int HoleCount(int aOutline) const
Returns the number of holes in a given outline.
 
int Append(int x, int y, int aOutline=-1, int aHole=-1, bool aAllowDuplication=false)
Appends a vertex at the end of the given outline/hole (default: the last outline)
 
int AddPolygon(const POLYGON &apolygon)
Adds a polygon to the set.
 
const std::vector< SEG > GenerateHatchLines(const std::vector< double > &aSlopes, int aSpacing, int aLineLength) const
 
const std::string Format(bool aCplusPlus=true) const override
 
void Simplify()
Simplify the polyset (merges overlapping polys, eliminates degeneracy/self-intersections)
 
std::vector< SHAPE_LINE_CHAIN > POLYGON
represents a single polygon outline with holes.
 
std::vector< std::unique_ptr< TRIANGULATED_POLYGON > > m_triangulatedPolys
 
SEGMENT_ITERATOR IterateSegments()
Return an iterator object, for all outlines in the set (no holes).
 
const SHAPE_LINE_CHAIN & Outline(int aIndex) const
 
CONST_SEGMENT_ITERATOR CIterateSegments() const
Returns an iterator object, for all outlines in the set (no holes)
 
ITERATOR_TEMPLATE< const VECTOR2I > CONST_ITERATOR
 
void inflate2(int aAmount, int aCircleSegCount, CORNER_STRATEGY aCornerStrategy, bool aSimplify=false)
 
int AddHole(const SHAPE_LINE_CHAIN &aHole, int aOutline=-1)
Adds a new hole to the given outline (default: last) and returns its index.
 
SEG::ecoord SquaredDistance(const VECTOR2I &aPoint, bool aOutlineOnly, VECTOR2I *aNearest) const
Compute the minimum distance squared between aPoint and all the polygons in the set.
 
void RemoveContour(int aContourIdx, int aPolygonIdx=-1)
Delete the aContourIdx-th contour of the aPolygonIdx-th polygon in the set.
 
void Unfracture()
Convert a single outline slitted ("fractured") polygon into a set ouf outlines with holes.
 
int ArcCount() const
Count the number of arc shapes present.
 
bool GetGlobalIndex(VERTEX_INDEX aRelativeIndices, int &aGlobalIdx) const
Compute the global index of a vertex from the relative indices of polygon, contour and vertex.
 
bool GetNeighbourIndexes(int aGlobalIndex, int *aPrevious, int *aNext) const
Return the global indexes of the previous and the next corner of the aGlobalIndex-th corner of a cont...
 
SHAPE_LINE_CHAIN & Outline(int aIndex)
Return the reference to aIndex-th outline in the set.
 
SHAPE_LINE_CHAIN & Hole(int aOutline, int aHole)
Return the reference to aHole-th hole in the aIndex-th outline.
 
bool IsSolid() const override
 
int NewOutline()
Creates a new empty polygon in the set and returns its index.
 
void SimplifyOutlines(int aMaxError=0)
Simplifies the lines in the polyset.
 
void booleanOp(Clipper2Lib::ClipType aType, const SHAPE_POLY_SET &aOtherShape)
This is the engine to execute all polygon boolean transforms (AND, OR, ... and polygon simplification...
 
const TRIANGULATED_POLYGON * TriangulatedPolygon(int aIndex) const
 
bool hasTouchingHoles(const POLYGON &aPoly) const
Return true if the polygon set has any holes that touch share a vertex.
 
CONST_SEGMENT_ITERATOR CIterateSegments(int aPolygonIdx) const
Return an iterator object, for iterating aPolygonIdx-th polygon edges.
 
SEG::ecoord SquaredDistance(const VECTOR2I &aPoint, bool aOutlineOnly=false) const override
 
bool PointOnEdge(const VECTOR2I &aP, int aAccuracy=0) const
Check if point aP lies on an edge or vertex of some of the outlines or holes.
 
bool CollideVertex(const VECTOR2I &aPoint, VERTEX_INDEX *aClosestVertex=nullptr, int aClearance=0) const
Check whether aPoint collides with any vertex of any of the contours of the polygon.
 
void DeletePolygonAndTriangulationData(int aIdx, bool aUpdateHash=true)
Delete aIdx-th polygon and its triangulation data from the set.
 
unsigned int TriangulatedPolyCount() const
Return the number of triangulated polygons.
 
std::atomic< bool > m_triangulationValid
 
void Deflate(int aAmount, CORNER_STRATEGY aCornerStrategy, int aMaxError)
 
void UpdateTriangulationDataHash()
 
void BooleanIntersection(const SHAPE_POLY_SET &b)
Perform boolean polyset intersection.
 
int NewHole(int aOutline=-1)
Creates a new hole in a given outline.
 
SEG::ecoord SquaredDistanceToPolygon(VECTOR2I aPoint, int aIndex, VECTOR2I *aNearest) const
Compute the minimum distance between the aIndex-th polygon and aPoint.
 
CONST_SEGMENT_ITERATOR CIterateSegmentsWithHoles() const
Return an iterator object, for the aOutline-th outline in the set (with holes).
 
void cacheTriangulation(bool aPartition, bool aSimplify, std::vector< std::unique_ptr< TRIANGULATED_POLYGON > > *aHintData)
 
virtual size_t GetIndexableSubshapeCount() const override
 
SEGMENT_ITERATOR IterateSegments(int aFirst, int aLast, bool aIterateHoles=false)
Return an iterator object, for iterating between aFirst and aLast outline, with or without holes (def...
 
ITERATOR Iterate(int aFirst, int aLast, bool aIterateHoles=false)
Return an object to iterate through the points of the polygons between aFirst and aLast.
 
CONST_SEGMENT_ITERATOR CIterateSegments(int aFirst, int aLast, bool aIterateHoles=false) const
Return an iterator object, for iterating between aFirst and aLast outline, with or without holes (def...
 
ITERATOR IterateFromVertexWithHoles(int aGlobalIdx)
 
SEG::ecoord SquaredDistanceToSeg(const SEG &aSegment, VECTOR2I *aNearest=nullptr) const
Compute the minimum distance squared between aSegment and all the polygons in the set.
 
void importPolyPath(const std::unique_ptr< Clipper2Lib::PolyPath64 > &aPolyPath, const std::vector< CLIPPER_Z_VALUE > &aZValueBuffer, const std::vector< SHAPE_ARC > &aArcBuffer)
 
void RebuildHolesFromContours()
Extract all contours from this polygon set, then recreate polygons with holes.
 
void Mirror(const VECTOR2I &aRef, FLIP_DIRECTION aFlipDirection)
Mirror the line points about y or x (or both)
 
void OffsetLineChain(const SHAPE_LINE_CHAIN &aLine, int aAmount, CORNER_STRATEGY aCornerStrategy, int aMaxError, bool aSimplify)
Perform offsetting of a line chain.
 
void BuildBBoxCaches() const
Construct BBoxCaches for Contains(), below.
 
std::vector< POLYGON > m_polys
 
const SHAPE_LINE_CHAIN & CHole(int aOutline, int aHole) const
 
POLYGON FilletPolygon(unsigned int aRadius, int aErrorMax, int aIndex)
Return a filleted version of the aIndex-th polygon.
 
bool containsSingle(const VECTOR2I &aP, int aSubpolyIndex, int aAccuracy, bool aUseBBoxCaches=false) const
Check whether the point aP is inside the aSubpolyIndex-th polygon of the polyset.
 
const VECTOR2I & CVertex(int aIndex, int aOutline, int aHole) const
Return the index-th vertex in a given hole outline within a given outline.
 
int OutlineCount() const
Return the number of outlines in the set.
 
void InflateWithLinkedHoles(int aFactor, CORNER_STRATEGY aCornerStrategy, int aMaxError)
Perform outline inflation/deflation, using round corners.
 
SEGMENT_ITERATOR_TEMPLATE< SEG > SEGMENT_ITERATOR
 
POLYGON chamferFilletPolygon(CORNER_MODE aMode, unsigned int aDistance, int aIndex, int aErrorMax)
Return the chamfered or filleted version of the aIndex-th polygon in the set, depending on the aMode ...
 
SHAPE_POLY_SET & operator=(SHAPE_POLY_SET &&aOther) noexcept
 
SHAPE_POLY_SET Fillet(int aRadius, int aErrorMax)
Return a filleted version of the polygon set.
 
void Move(const VECTOR2I &aVector) override
 
bool HasTouchingHoles() const
Return true if the polygon set has any holes that share a vertex.
 
SHAPE * Clone() const override
Return a dynamically allocated copy of the shape.
 
SHAPE_POLY_SET & operator=(const SHAPE_POLY_SET &aOther)
 
bool Contains(const VECTOR2I &aP, int aSubpolyIndex=-1, int aAccuracy=0, bool aUseBBoxCaches=false) const
Return true if a given subpolygon contains the point aP.
 
SHAPE_POLY_SET CloneDropTriangulation() const
 
void TransformToPolygon(SHAPE_POLY_SET &aBuffer, int aError, ERROR_LOC aErrorLoc) const override
Fills a SHAPE_POLY_SET with a polygon representation of this shape.
 
bool isExteriorWaist(const SEG &aSegA, const SEG &aSegB) const
Check if two line segments are collinear and overlap.
 
void BooleanSubtract(const SHAPE_POLY_SET &b)
Perform boolean polyset difference.
 
const POLYGON & CPolygon(int aIndex) const
 
CONST_ITERATOR CIterateWithHoles(int aOutline) const
 
const SHAPE_LINE_CHAIN & COutline(int aIndex) const
 
POLYGON ChamferPolygon(unsigned int aDistance, int aIndex)
Return a chamfered version of the aIndex-th polygon.
 
bool PointInside(const VECTOR2I &aPt, int aAccuracy=0, bool aUseBBoxCache=false) const override
Check if point aP lies inside a closed shape.
 
const std::vector< POLYGON > & CPolygons() const
 
SEGMENT_ITERATOR IterateSegmentsWithHoles()
Returns an iterator object, for all outlines in the set (with holes)
 
const BOX2I BBoxFromCaches() const
 
CONST_SEGMENT_ITERATOR CIterateSegmentsWithHoles(int aOutline) const
Return an iterator object, for the aOutline-th outline in the set (with holes).
 
const BOX2I BBox(int aClearance=0) const override
Compute a bounding box of the shape, with a margin of aClearance a collision.
 
void importTree(Clipper2Lib::PolyTree64 &tree, const std::vector< CLIPPER_Z_VALUE > &aZValueBuffer, const std::vector< SHAPE_ARC > &aArcBuffe)
 
SEGMENT_ITERATOR_TEMPLATE< const SEG > CONST_SEGMENT_ITERATOR
 
bool IsSelfIntersecting() const
Check whether any of the polygons in the set is self intersecting.
 
An abstract shape on 2D plane.
 
SHAPE(SHAPE_TYPE aType)
Create an empty shape of type aType.
 
constexpr extended_type Cross(const VECTOR2< T > &aVector) const
Compute cross product of self with aVector.
 
CORNER_STRATEGY
define how inflate transform build inflated polygon
 
EDA_ANGLE abs(const EDA_ANGLE &aAngle)
 
@ SH_POLY_SET_TRIANGLE
a single triangle belonging to a POLY_SET triangulation
 
std::vector< FAB_LAYER_COLOR > dummy
 
A storage class for 128-bit hash value.
 
virtual bool IsClosed() const override
 
TRI(int _a=0, int _b=0, int _c=0, TRIANGULATED_POLYGON *aParent=nullptr)
 
virtual bool IsSolid() const override
 
virtual void Move(const VECTOR2I &aVector) override
 
virtual void Rotate(const EDA_ANGLE &aAngle, const VECTOR2I &aCenter={ 0, 0 }) override
 
virtual const BOX2I BBox(int aClearance=0) const override
Compute a bounding box of the shape, with a margin of aClearance a collision.
 
virtual size_t GetPointCount() const override
 
virtual const VECTOR2I GetPoint(int aIndex) const override
 
TRIANGULATED_POLYGON * parent
 
virtual size_t GetSegmentCount() const override
 
virtual const SEG GetSegment(int aIndex) const override
 
Structure to hold the necessary information in order to index a vertex on a SHAPE_POLY_SET object: th...
 
VECTOR2< int32_t > VECTOR2I
 
VECTOR2< double > VECTOR2D