KiCad PCB EDA Suite
|
#include <glyph.h>
Public Types | |
enum | POLYGON_MODE { PM_FAST = true , PM_STRICTLY_SIMPLE = false } |
Operations on polygons use a aFastMode param if aFastMode is PM_FAST (true) the result can be a weak polygon if aFastMode is PM_STRICTLY_SIMPLE (false) (default) the result is (theoretically) a strictly simple polygon, but calculations can be really significantly time consuming Most of time PM_FAST is preferable. More... | |
typedef std::vector< SHAPE_LINE_CHAIN > | POLYGON |
represents a single polygon outline with holes. | |
typedef ITERATOR_TEMPLATE< VECTOR2I > | ITERATOR |
typedef ITERATOR_TEMPLATE< const VECTOR2I > | CONST_ITERATOR |
typedef SEGMENT_ITERATOR_TEMPLATE< SEG > | SEGMENT_ITERATOR |
typedef SEGMENT_ITERATOR_TEMPLATE< const SEG > | CONST_SEGMENT_ITERATOR |
Public Member Functions | |
OUTLINE_GLYPH () | |
OUTLINE_GLYPH (const OUTLINE_GLYPH &aGlyph) | |
OUTLINE_GLYPH (const SHAPE_POLY_SET &aPoly) | |
bool | IsOutline () const override |
BOX2D | BoundingBox () override |
void | Triangulate (std::function< void(const VECTOR2I &aPt1, const VECTOR2I &aPt2, const VECTOR2I &aPt3)> aCallback) const |
void | CacheTriangulation (bool aPartition=true, bool aSimplify=false) override |
Build a polygon triangulation, needed to draw a polygon on OpenGL and in some other calculations. | |
std::vector< std::unique_ptr< SHAPE_POLY_SET::TRIANGULATED_POLYGON > > | GetTriangulationData () const |
void | CacheTriangulation (std::vector< std::unique_ptr< SHAPE_POLY_SET::TRIANGULATED_POLYGON > > &aHintData) |
Cache the triangulation for the glyph from a known set of triangle indexes. | |
virtual bool | IsStroke () const |
bool | IsTriangulationUpToDate () const |
HASH_128 | GetHash () const |
virtual bool | HasIndexableSubshapes () const override |
virtual size_t | GetIndexableSubshapeCount () const override |
virtual void | GetIndexableSubshapes (std::vector< const SHAPE * > &aSubshapes) const override |
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 list of all vertices in all contours— and get the index of the vertex relative to the contour relative to the polygon in which it is. | |
bool | GetGlobalIndex (VERTEX_INDEX aRelativeIndices, int &aGlobalIdx) const |
Compute the global index of a vertex from the relative indices of polygon, contour and vertex. | |
SHAPE * | Clone () const override |
Return a dynamically allocated copy of the shape. | |
SHAPE_POLY_SET | CloneDropTriangulation () const |
int | NewOutline () |
Creates a new empty polygon in the set and returns its index. | |
int | NewHole (int aOutline=-1) |
Creates a new hole in a given outline. | |
int | AddOutline (const SHAPE_LINE_CHAIN &aOutline) |
Adds a new outline to the set and returns its index. | |
int | AddHole (const SHAPE_LINE_CHAIN &aHole, int aOutline=-1) |
Adds a new hole to the given outline (default: last) and returns its index. | |
int | AddPolygon (const POLYGON &apolygon) |
Adds a polygon to the set. | |
double | Area () |
Return the area of this poly set. | |
int | ArcCount () const |
Count the number of arc shapes present. | |
void | GetArcs (std::vector< SHAPE_ARC > &aArcBuffer) const |
Appends all the arcs in this polyset to aArcBuffer. | |
void | ClearArcs () |
Removes all arc references from all the outlines and holes in the polyset. | |
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) | |
void | Append (const SHAPE_POLY_SET &aSet) |
Merge polygons from two sets. | |
void | Append (const VECTOR2I &aP, int aOutline=-1, int aHole=-1) |
Append a vertex at the end of the given outline/hole (default: the last outline) | |
int | Append (const SHAPE_ARC &aArc, int aOutline=-1, int aHole=-1, double aAccuracy=SHAPE_ARC::DefaultAccuracyForPCB()) |
Append a new arc to the contour indexed by aOutline and aHole (defaults to the outline of the last polygon). | |
void | InsertVertex (int aGlobalIndex, const VECTOR2I &aNewVertex) |
Adds a vertex in the globally indexed position aGlobalIndex. | |
const VECTOR2I & | CVertex (int aIndex, int aOutline, int aHole) const |
Return the index-th vertex in a given hole outline within a given outline. | |
const VECTOR2I & | CVertex (int aGlobalIndex) const |
Return the aGlobalIndex-th vertex in the poly set. | |
const VECTOR2I & | CVertex (VERTEX_INDEX aIndex) const |
Return the index-th vertex in a given hole outline within a given outline. | |
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 contour in the polygon set. | |
bool | IsPolygonSelfIntersecting (int aPolygonIndex) const |
Check whether the aPolygonIndex-th polygon in the set is self intersecting. | |
bool | IsSelfIntersecting () const |
Check whether any of the polygons in the set is self intersecting. | |
unsigned int | TriangulatedPolyCount () const |
Return the number of triangulated polygons. | |
int | OutlineCount () const |
Return the number of outlines in the set. | |
int | VertexCount (int aOutline=-1, int aHole=-1) const |
Return the number of vertices in a given outline/hole. | |
int | FullPointCount () const |
Return the number of points in the shape poly set. | |
int | HoleCount (int aOutline) const |
Returns the number of holes in a given outline. | |
SHAPE_LINE_CHAIN & | Outline (int aIndex) |
Return the reference to aIndex-th outline in the set. | |
const SHAPE_LINE_CHAIN & | Outline (int aIndex) const |
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) |
SHAPE_LINE_CHAIN & | Hole (int aOutline, int aHole) |
Return the reference to aHole-th hole in the aIndex-th outline. | |
POLYGON & | Polygon (int aIndex) |
Return the aIndex-th subpolygon in the set. | |
const POLYGON & | Polygon (int aIndex) const |
const TRIANGULATED_POLYGON * | TriangulatedPolygon (int aIndex) const |
const SHAPE_LINE_CHAIN & | COutline (int aIndex) const |
const SHAPE_LINE_CHAIN & | CHole (int aOutline, int aHole) const |
const POLYGON & | CPolygon (int aIndex) const |
const std::vector< POLYGON > & | CPolygons () const |
ITERATOR | Iterate (int aFirst, int aLast, bool aIterateHoles=false) |
Return an object to iterate through the points of the polygons between aFirst and aLast . | |
ITERATOR | Iterate (int aOutline) |
ITERATOR | Iterate () |
ITERATOR | IterateWithHoles (int aOutline) |
ITERATOR | IterateWithHoles () |
CONST_ITERATOR | CIterate (int aFirst, int aLast, bool aIterateHoles=false) const |
CONST_ITERATOR | CIterate (int aOutline) const |
CONST_ITERATOR | CIterate () const |
CONST_ITERATOR | CIterateWithHoles (int aOutline) const |
CONST_ITERATOR | CIterateWithHoles () const |
ITERATOR | IterateFromVertexWithHoles (int aGlobalIdx) |
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 (default: without) | |
SEGMENT_ITERATOR | IterateSegments (int aPolygonIdx) |
Return an iterator object, for iterating aPolygonIdx-th polygon edges. | |
SEGMENT_ITERATOR | IterateSegments () |
Return an iterator object, for all outlines in the set (no holes). | |
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 (default: without) | |
CONST_SEGMENT_ITERATOR | CIterateSegments (int aPolygonIdx) const |
Return an iterator object, for iterating aPolygonIdx-th polygon edges. | |
CONST_SEGMENT_ITERATOR | CIterateSegments () const |
Returns an iterator object, for all outlines in the set (no holes) | |
SEGMENT_ITERATOR | IterateSegmentsWithHoles () |
Returns an iterator object, for all outlines in the set (with holes) | |
SEGMENT_ITERATOR | IterateSegmentsWithHoles (int aOutline) |
Return an iterator object, for the aOutline-th outline in the set (with holes). | |
CONST_SEGMENT_ITERATOR | CIterateSegmentsWithHoles () const |
Return an iterator object, for the aOutline-th outline in the set (with holes). | |
CONST_SEGMENT_ITERATOR | CIterateSegmentsWithHoles (int aOutline) const |
Return an iterator object, for the aOutline-th outline in the set (with holes). | |
void | BooleanAdd (const SHAPE_POLY_SET &b, POLYGON_MODE aFastMode) |
Perform boolean polyset union For aFastMode meaning, see function booleanOp. | |
void | BooleanAdd (const SHAPE_POLY_SET &a, const SHAPE_POLY_SET &b, POLYGON_MODE aFastMode) |
Perform boolean polyset union between a and b, store the result in it self For aFastMode meaning, see function booleanOp. | |
void | BooleanSubtract (const SHAPE_POLY_SET &b, POLYGON_MODE aFastMode) |
Perform boolean polyset difference For aFastMode meaning, see function booleanOp. | |
void | BooleanSubtract (const SHAPE_POLY_SET &a, const SHAPE_POLY_SET &b, POLYGON_MODE aFastMode) |
Perform boolean polyset difference between a and b, store the result in it self For aFastMode meaning, see function booleanOp. | |
void | BooleanIntersection (const SHAPE_POLY_SET &b, POLYGON_MODE aFastMode) |
Perform boolean polyset intersection For aFastMode meaning, see function booleanOp. | |
void | BooleanIntersection (const SHAPE_POLY_SET &a, const SHAPE_POLY_SET &b, POLYGON_MODE aFastMode) |
Perform boolean polyset intersection between a and b, store the result in it self For aFastMode meaning, see function booleanOp. | |
void | BooleanXor (const SHAPE_POLY_SET &b, POLYGON_MODE aFastMode) |
Perform boolean polyset exclusive or For aFastMode meaning, see function booleanOp. | |
void | BooleanXor (const SHAPE_POLY_SET &a, const SHAPE_POLY_SET &b, POLYGON_MODE aFastMode) |
Perform boolean polyset exclusive or between a and b, store the result in it self For aFastMode meaning, see function booleanOp. | |
void | RebuildHolesFromContours () |
Extract all contours from this polygon set, then recreate polygons with holes. | |
void | Inflate (int aAmount, CORNER_STRATEGY aCornerStrategy, int aMaxError, bool aSimplify=false) |
Perform outline inflation/deflation. | |
void | Deflate (int aAmount, CORNER_STRATEGY aCornerStrategy, int aMaxError) |
void | OffsetLineChain (const SHAPE_LINE_CHAIN &aLine, int aAmount, CORNER_STRATEGY aCornerStrategy, int aMaxError, bool aSimplify) |
Perform offsetting of a line chain. | |
void | InflateWithLinkedHoles (int aFactor, CORNER_STRATEGY aCornerStrategy, int aMaxError, POLYGON_MODE aFastMode) |
Perform outline inflation/deflation, using round corners. | |
void | Fracture (POLYGON_MODE aFastMode) |
Convert a set of polygons with holes to a single outline with "slits"/"fractures" connecting the outer ring to the inner holes For aFastMode meaning, see function booleanOp. | |
void | Unfracture (POLYGON_MODE aFastMode) |
Convert a single outline slitted ("fractured") polygon into a set ouf outlines with holes. | |
bool | HasHoles () const |
Return true if the polygon set has any holes. | |
bool | HasTouchingHoles () const |
Return true if the polygon set has any holes that share a vertex. | |
void | Simplify (POLYGON_MODE aFastMode) |
Simplify the polyset (merges overlapping polys, eliminates degeneracy/self-intersections) For aFastMode meaning, see function booleanOp. | |
void | SimplifyOutlines (int aMaxError=0) |
Simplifies the lines in the polyset. | |
int | NormalizeAreaOutlines () |
Convert a self-intersecting polygon to one (or more) non self-intersecting polygon(s). | |
const std::string | Format (bool aCplusPlus=true) const override |
bool | Parse (std::stringstream &aStream) override |
void | Move (const VECTOR2I &aVector) override |
void | Mirror (const VECTOR2I &aRef, FLIP_DIRECTION aFlipDirection) |
Mirror the line points about y or x (or both) | |
void | Rotate (const EDA_ANGLE &aAngle, const VECTOR2I &aCenter={ 0, 0 }) override |
Rotate all vertices by a given angle. | |
bool | IsSolid () const override |
const BOX2I | BBox (int aClearance=0) const override |
Compute a bounding box of the shape, with a margin of aClearance a collision. | |
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 | 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, indicating a collision. | |
bool | Collide (const VECTOR2I &aP, int aClearance=0, int *aActual=nullptr, VECTOR2I *aLocation=nullptr) const override |
Check whether the point aP is either inside or on the edge of the polygon set. | |
bool | Collide (const SEG &aSeg, int aClearance=0, int *aActual=nullptr, VECTOR2I *aLocation=nullptr) const override |
Check whether the segment aSeg collides with the polygon set (or its edge). | |
virtual bool | Collide (const SHAPE *aShape, int aClearance, VECTOR2I *aMTV) const |
Check if the boundary of shape (this) lies closer to the shape aShape than aClearance, indicating a collision. | |
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. | |
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. | |
bool | PointInside (const VECTOR2I &aPt, int aAccuracy=0, bool aUseBBoxCache=false) const override |
Check if point aP lies inside a closed shape. | |
void | BuildBBoxCaches () const |
Construct BBoxCaches for Contains(), below. | |
const BOX2I | BBoxFromCaches () const |
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. | |
bool | IsEmpty () const |
Return true if the set is empty (no polygons at all) | |
void | RemoveVertex (int aGlobalIndex) |
Delete the aGlobalIndex-th vertex. | |
void | RemoveVertex (VERTEX_INDEX aRelativeIndices) |
Delete the vertex indexed by aRelativeIndex (index of polygon, contour and vertex). | |
void | RemoveAllContours () |
Remove all outlines & holes (clears) the polygon set. | |
void | RemoveContour (int aContourIdx, int aPolygonIdx=-1) |
Delete the aContourIdx-th contour of the aPolygonIdx-th polygon in the set. | |
void | RemoveOutline (int aOutlineIdx) |
Delete the aOutlineIdx-th outline of the set including its contours and holes. | |
int | RemoveNullSegments () |
Look for null segments; ie, segments whose ends are exactly the same and deletes them. | |
void | SetVertex (const VERTEX_INDEX &aIndex, const VECTOR2I &aPos) |
Accessor function to set the position of a specific point. | |
void | SetVertex (int aGlobalIndex, const VECTOR2I &aPos) |
Set the vertex based on the global index. | |
int | TotalVertices () const |
Return total number of vertices stored in the set. | |
void | DeletePolygon (int aIdx) |
Delete aIdx-th polygon from the set. | |
void | DeletePolygonAndTriangulationData (int aIdx, bool aUpdateHash=true) |
Delete aIdx-th polygon and its triangulation data from the set. | |
void | UpdateTriangulationDataHash () |
POLYGON | ChamferPolygon (unsigned int aDistance, int aIndex) |
Return a chamfered version of the aIndex-th polygon. | |
POLYGON | FilletPolygon (unsigned int aRadius, int aErrorMax, int aIndex) |
Return a filleted version of the aIndex-th polygon. | |
SHAPE_POLY_SET | Chamfer (int aDistance) |
Return a chamfered version of the polygon set. | |
SHAPE_POLY_SET | Fillet (int aRadius, int aErrorMax) |
Return a filleted version of the polygon set. | |
SEG::ecoord | SquaredDistanceToPolygon (VECTOR2I aPoint, int aIndex, VECTOR2I *aNearest) const |
Compute the minimum distance between the aIndex-th polygon and aPoint. | |
SEG::ecoord | SquaredDistanceToPolygon (const SEG &aSegment, int aIndex, VECTOR2I *aNearest) const |
Compute the minimum distance between the aIndex-th polygon and aSegment with a possible width. | |
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. | |
SEG::ecoord | SquaredDistance (const VECTOR2I &aPoint, bool aOutlineOnly=false) const override |
SEG::ecoord | SquaredDistanceToSeg (const SEG &aSegment, VECTOR2I *aNearest=nullptr) const |
Compute the minimum distance squared between aSegment and all the polygons in the set. | |
bool | IsVertexInHole (int aGlobalIdx) |
Check whether the aGlobalIndex-th vertex belongs to a hole. | |
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. | |
int | GetClearance (const SHAPE *aOther) const |
Return the actual minimum distance between two shapes. | |
bool | IsNull () const |
Return true if the shape is a null shape. | |
virtual VECTOR2I | Centre () const |
Compute a center-of-mass of the shape. | |
virtual int | Distance (const VECTOR2I &aP) const |
Returns the minimum distance from a given point to this shape. | |
FACET * | NewFacet () |
SGNODE * | CalcShape (SGNODE *aParent, SGNODE *aColor, WRL1_ORDER aVertexOrder, float aCreaseLimit=0.74317, bool isVRML2=false) |
SHAPE_TYPE | Type () const |
Return the type of the shape. | |
wxString | TypeName () const |
Static Public Member Functions | |
static const SHAPE_POLY_SET | BuildPolysetFromOrientedPaths (const std::vector< SHAPE_LINE_CHAIN > &aPaths, bool aReverseOrientation=false, bool aEvenOdd=false) |
Build a SHAPE_POLY_SET from a bunch of outlines in provided in random order. | |
Static Public Attributes | |
static const int | MIN_PRECISION_IU = 4 |
This is the minimum precision for all the points in a shape. | |
Protected Types | |
typedef VECTOR2I::extended_type | ecoord |
Protected Member Functions | |
void | cacheTriangulation (bool aPartition, bool aSimplify, std::vector< std::unique_ptr< TRIANGULATED_POLYGON > > *aHintData) |
Protected Attributes | |
std::vector< POLYGON > | m_polys |
std::vector< std::unique_ptr< TRIANGULATED_POLYGON > > | m_triangulatedPolys |
std::atomic< bool > | m_triangulationValid = false |
std::mutex | m_triangulationMutex |
SHAPE_TYPE | m_type |
< type of our shape | |
Private Types | |
enum | DROP_TRIANGULATION_FLAG { SINGLETON } |
enum | CORNER_MODE { CHAMFERED , FILLETED } |
Operation ChamferPolygon and FilletPolygon are computed under the private chamferFillet method; this enum is defined to make the necessary distinction when calling this method from the public ChamferPolygon and FilletPolygon methods. More... | |
Private Member Functions | |
void | fractureSingle (POLYGON &paths) |
void | unfractureSingle (POLYGON &path) |
void | importTree (ClipperLib::PolyTree *tree, const std::vector< CLIPPER_Z_VALUE > &aZValueBuffer, const std::vector< SHAPE_ARC > &aArcBuffe) |
void | importTree (Clipper2Lib::PolyTree64 &tree, const std::vector< CLIPPER_Z_VALUE > &aZValueBuffer, const std::vector< SHAPE_ARC > &aArcBuffe) |
void | importPaths (Clipper2Lib::Paths64 &paths, const std::vector< CLIPPER_Z_VALUE > &aZValueBuffer, const std::vector< SHAPE_ARC > &aArcBuffe) |
void | importPolyPath (const std::unique_ptr< Clipper2Lib::PolyPath64 > &aPolyPath, const std::vector< CLIPPER_Z_VALUE > &aZValueBuffer, const std::vector< SHAPE_ARC > &aArcBuffer) |
void | inflate1 (int aAmount, int aCircleSegCount, CORNER_STRATEGY aCornerStrategy) |
void | inflate2 (int aAmount, int aCircleSegCount, CORNER_STRATEGY aCornerStrategy, bool aSimplify=false) |
void | inflateLine2 (const SHAPE_LINE_CHAIN &aLine, int aAmount, int aCircleSegCount, CORNER_STRATEGY aCornerStrategy, bool aSimplify=false) |
void | booleanOp (ClipperLib::ClipType aType, const SHAPE_POLY_SET &aOtherShape, POLYGON_MODE aFastMode) |
This is the engine to execute all polygon boolean transforms (AND, OR, ... and polygon simplification (merging overlapping polygons). | |
void | booleanOp (ClipperLib::ClipType aType, const SHAPE_POLY_SET &aShape, const SHAPE_POLY_SET &aOtherShape, POLYGON_MODE aFastMode) |
void | booleanOp (Clipper2Lib::ClipType aType, const SHAPE_POLY_SET &aOtherShape) |
void | booleanOp (Clipper2Lib::ClipType aType, const SHAPE_POLY_SET &aShape, const SHAPE_POLY_SET &aOtherShape) |
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. | |
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 selected. | |
bool | hasTouchingHoles (const POLYGON &aPoly) const |
Return true if the polygon set has any holes that touch share a vertex. | |
HASH_128 | checksum () const |
Private Attributes | |
HASH_128 | m_hash |
bool | m_hashValid = false |
std::list< FACET * > | facets |
|
inherited |
Definition at line 503 of file shape_poly_set.h.
|
inherited |
Definition at line 507 of file shape_poly_set.h.
|
protectedinherited |
|
inherited |
Definition at line 502 of file shape_poly_set.h.
|
inherited |
represents a single polygon outline with holes.
The first entry is the outline, the remaining (if any), are the holes N.B. SWIG only supports typedef, so avoid c++ 'using' keyword
Definition at line 74 of file shape_poly_set.h.
|
inherited |
Definition at line 506 of file shape_poly_set.h.
|
privateinherited |
Operation ChamferPolygon and FilletPolygon are computed under the private chamferFillet method; this enum is defined to make the necessary distinction when calling this method from the public ChamferPolygon and FilletPolygon methods.
Enumerator | |
---|---|
CHAMFERED | |
FILLETED |
Definition at line 1554 of file shape_poly_set.h.
|
privateinherited |
Enumerator | |
---|---|
SINGLETON |
Definition at line 1484 of file shape_poly_set.h.
|
inherited |
Operations on polygons use a aFastMode param if aFastMode is PM_FAST (true) the result can be a weak polygon if aFastMode is PM_STRICTLY_SIMPLE (false) (default) the result is (theoretically) a strictly simple polygon, but calculations can be really significantly time consuming Most of time PM_FAST is preferable.
PM_STRICTLY_SIMPLE can be used in critical cases (Gerber output for instance)
Enumerator | |
---|---|
PM_FAST | |
PM_STRICTLY_SIMPLE |
Definition at line 997 of file shape_poly_set.h.
|
inline |
|
inline |
|
inherited |
Adds a new hole to the given outline (default: last) and returns its index.
Definition at line 561 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::m_polys.
Referenced by KIGEOM::AddHoleIfValid(), ZONE::AddPolygon(), BuildBoardPolygonOutlines(), BuildFootprintPolygonOutlines(), KI_TEST::BuildHollowSquare(), SHAPE_POLY_SET::cacheTriangulation(), KI_TEST::CommonTestData::CommonTestData(), ALTIUM_PCB::ConvertShapeBasedRegions6ToBoardItemOnLayer(), ALTIUM_PCB::ConvertShapeBasedRegions6ToFootprintItemOnLayer(), CADSTAR_ARCHIVE_PARSER::SHAPE::ConvertToPolySet(), doConvertOutlineToPolygon(), BOARD::GetBoardPolygonOutlines(), CADSTAR_PCB_ARCHIVE_LOADER::getPolySetFromCadstarShape(), FABMASTER::loadFootprints(), FABMASTER::loadShapePolySet(), ALTIUM_PCB::ParseRegions6Data(), PCB_IO_KICAD_SEXPR_PARSER::parseRenderCache(), PCB_IO_EASYEDA_PARSER::ParseToBoardItemContainer(), playground_main_func(), and SHAPE_POLY_SET::RebuildHolesFromContours().
|
inherited |
Adds a new outline to the set and returns its index.
Definition at line 547 of file shape_poly_set.cpp.
References SHAPE_LINE_CHAIN::IsClosed(), and SHAPE_POLY_SET::m_polys.
Referenced by ZONE_FILLER::addHatchFillTypeOnZone(), ZONE::AddPolygon(), BOOST_AUTO_TEST_CASE(), buildBoardBoundingBoxPoly(), KI_TEST::BuildHollowSquare(), KI_TEST::BuildPolyset(), KI_TEST::CommonTestData::CommonTestData(), ConvertImageToPolygons(), ConvertPolygonToBlocks(), ALTIUM_PCB::ConvertShapeBasedRegions6ToBoardItemOnLayer(), ALTIUM_PCB::ConvertShapeBasedRegions6ToFootprintItemOnLayer(), CADSTAR_ARCHIVE_PARSER::SHAPE::ConvertToPolySet(), MULTICHANNEL_TOOL::copyRuleAreaContents(), FOOTPRINT::CoverageRatio(), BOARD_ADAPTER::createPadWithMargin(), doConvertOutlineToPolygon(), KIGFX::GERBVIEW_PAINTER::draw(), EDA_SHAPE::EDA_SHAPE(), ZONE_FILLER::Fill(), ZONE_FILLER::fillCopperZone(), GEOM_TEST::FilletPolySet(), FOOTPRINT::GetBoundingHull(), PNS::HOLE::Hull(), PNS::SOLID::Hull(), FEATURES_MANAGER::InitFeatureList(), IteratorFixture::IteratorFixture(), KIGFX::knockoutText(), DSN::SPECCTRA_DB::makeIMAGE(), CONVERT_TOOL::makePolysFromChainedSegs(), PAD::MergePrimitivesAsPolygon(), SHAPE_POLY_SET::NormalizeAreaOutlines(), PCB_IO_EAGLE::packagePolygon(), PCB_IO_EASYEDAPRO_PARSER::ParseBoard(), PCB_IO_EASYEDAPRO_PARSER::ParseFootprint(), ALTIUM_PCB::ParseRegions6Data(), PCB_IO_KICAD_SEXPR_PARSER::parseRenderCache(), partitionPolyIntoRegularCellGrid(), ZONE_CREATE_HELPER::performZoneCutout(), PlotStandardLayer(), SHAPE_POLY_SET::RebuildHolesFromContours(), SHAPE_POLY_SET::SHAPE_POLY_SET(), TestConcaveSquareFillet(), TestSquareFillet(), SHAPE_LINE_CHAIN::TransformToPolygon(), and SHAPE_SIMPLE::TransformToPolygon().
|
inherited |
Adds a polygon to the set.
Definition at line 580 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::m_polys.
Referenced by SHAPE_POLY_SET::SHAPE_POLY_SET(), and kiapi::common::UnpackPolySet().
|
inherited |
Append a new arc to the contour indexed by aOutline
and aHole
(defaults to the outline of the last polygon).
aArc | The arc to be inserted |
aOutline | Index of the polygon |
aHole | Index of the hole (-1 for the main outline) |
aAccuracy | Accuracy of the arc representation in IU |
Definition at line 294 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::m_polys.
|
inherited |
Merge polygons from two sets.
Definition at line 2531 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::m_polys.
|
inherited |
Append a vertex at the end of the given outline/hole (default: the last outline)
Definition at line 2537 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::Append(), VECTOR2< T >::x, and VECTOR2< T >::y.
|
inherited |
Appends a vertex at the end of the given outline/hole (default: the last outline)
Add a new vertex to the contour indexed by aOutline
and aHole
(defaults to the outline of the last polygon).
x | is the x coordinate of the new vertex. |
y | is the y coordinate of the new vertex. |
aOutline | is the index of the polygon. |
aHole | is the index of the hole (-1 for the main outline), |
aAllowDuplication | is a flag to indicate whether it is allowed to add this corner even if it is duplicated. |
Definition at line 271 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::m_polys.
Referenced by AR_AUTOPLACER::addFpBody(), addHoleToPolygon(), ZONE_FILLER::addKnockout(), AR_AUTOPLACER::addPad(), PAD::AddPrimitivePoly(), PCB_IO_IPC2581::addShape(), SHAPE_POLY_SET::Append(), ZONE::AppendCorner(), BOARD::BOARD(), BOOST_AUTO_TEST_CASE(), BuildBoardPolygonOutlines(), PCB_TEXT::buildBoundingHull(), ZONE_FILLER::buildCopperItemClearances(), BuildFootprintPolygonOutlines(), TEARDROP_MANAGER::computeAnchorPoints(), AM_PRIMITIVE::ConvertBasicShapeToPolygon(), ALTIUM_PCB::ConvertFills6ToFootprintItemOnLayer(), GERBER_DRAW_ITEM::ConvertSegmentToPolygon(), D_CODE::ConvertShapeToPolygon(), CornerListToPolygon(), BITMAPCONV_INFO::createOutputData(), BOARD_ADAPTER::createPadWithMargin(), STEP_PCB_MODEL::CreatePCB(), CONVERT_TOOL::CreatePolys(), TEARDROP_MANAGER::createTeardrop(), KIGFX::PCB_PAINTER::draw(), KIGFX::GERBVIEW_PAINTER::drawPolygon(), GERBER_FILE_IMAGE::Execute_DCODE_Command(), GERBER_FILE_IMAGE::Execute_G_Command(), fillArcPOLY(), PCB_BASE_FRAME::FocusOnItems(), FOOTPRINT::GetBoundingHull(), getRectangleAlongCentreLine(), EDA_SHAPE::hitTest(), SHAPE_POLY_SET::InsertVertex(), KIGFX::knockoutText(), FABMASTER::loadFootprints(), PCB_IO_EAGLE::loadPolygon(), FABMASTER::loadShapePolySet(), SCH_IO_EAGLE::loadSymbolPolyLine(), PCB_IO_KICAD_LEGACY::loadZONE_CONTAINER(), DSN::SPECCTRA_DB::makeIMAGE(), CONVERT_TOOL::makePolysFromClosedGraphics(), PCB_IO_EASYEDAPRO_PARSER::ParseBoard(), PCB_IO_EASYEDA_PARSER::ParseToBoardItemContainer(), DXF_PLOTTER::PlotPoly(), BRDITEMS_PLOTTER::PlotShape(), PlotStandardLayer(), POLYGON_BOOLEAN_ROUTINE::ProcessShape(), RENDER_3D_OPENGL::reload(), EDA_SHAPE::rotate(), KIGFX::PREVIEW::POLYGON_ITEM::SetPoints(), EDA_SHAPE::SetPolyPoints(), SHAPE_POLY_SET::SHAPE_POLY_SET(), DS_DATA_ITEM_POLYGONS::SyncDrawItems(), TransformArcToPolygon(), TransformCircleToPolygon(), TransformOvalToPolygon(), TransformRingToPolygon(), TransformRoundChamferedRectToPolygon(), EDA_SHAPE::TransformShapeToPolygon(), ZONE::TransformShapeToPolygon(), PCB_TEXTBOX::TransformShapeToPolygon(), PAD::TransformShapeToPolygon(), ZONE::TransformSmoothedOutlineToPolygon(), ZONE::TransformSolidAreasShapesToPolygon(), PCB_TEXT::TransformTextToPolySet(), PCB_TEXTBOX::TransformTextToPolySet(), SHAPE_POLY_SET::TransformToPolygon(), TransformTrapezoidToPolygon(), PCB_DIM_ALIGNED::updateGeometry(), PCB_DIM_ORTHOGONAL::updateGeometry(), PCB_DIM_RADIAL::updateGeometry(), and PCB_DIM_LEADER::updateGeometry().
|
inherited |
Count the number of arc shapes present.
Definition at line 604 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::ArcCount(), and SHAPE_POLY_SET::m_polys.
Referenced by SHAPE_POLY_SET::ArcCount(), and SHAPE_POLY_SET::booleanOp().
|
inherited |
Return the area of this poly set.
Definition at line 588 of file shape_poly_set.cpp.
References SHAPE_LINE_CHAIN::Area(), SHAPE_POLY_SET::Hole(), SHAPE_POLY_SET::HoleCount(), SHAPE_POLY_SET::Outline(), and SHAPE_POLY_SET::OutlineCount().
Referenced by BOOST_AUTO_TEST_CASE(), ZONE::CalculateOutlineArea(), CADSTAR_PCB_ARCHIVE_LOADER::calculateZonePriorities(), ZONE_FILLER::Fill(), polygonArea(), and DRC_TEST_PROVIDER_TEXT_DIMS::Run().
|
overridevirtualinherited |
Compute a bounding box of the shape, with a margin of aClearance a collision.
aClearance | how much the bounding box is expanded wrs to the minimum enclosing rectangle for the shape. |
Implements SHAPE.
Definition at line 2234 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::BBox(), BOX2< Vec >::Inflate(), SHAPE_POLY_SET::m_polys, and BOX2< Vec >::Merge().
Referenced by ZONE_FILLER::addHatchFillTypeOnZone(), SHAPE_POLY_SET::BBox(), BoundingBox(), PCB_TEXT::buildBoundingHull(), DRAWING_TOOL::DrawBoardCharacteristics(), PCB_BASE_FRAME::FocusOnItems(), GERBER_DRAW_ITEM::GetBoundingBox(), DS_DRAW_ITEM_POLYPOLYGONS::GetBoundingBox(), ZONE::GetBoundingBox(), DIALOG_BOARD_STATISTICS::getDataFromPCB(), D_CODE::GetShapeDim(), KIGFX::knockoutText(), PCB_IO_EASYEDAPRO_PARSER::ParseBoard(), PCB_IO_EASYEDAPRO_PARSER::ParseFootprint(), partitionPolyIntoRegularCellGrid(), BRDITEMS_PLOTTER::PlotText(), KIGFX::VIEW::SetCenter(), BOARD::TestZoneIntersection(), KIGFX::PREVIEW::CENTRELINE_RECT_ITEM::ViewBBox(), KIGFX::PREVIEW::POLYGON_ITEM::ViewBBox(), and GERBER_DRAW_ITEM::ViewGetLOD().
|
inherited |
Definition at line 2251 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::m_polys, and BOX2< Vec >::Merge().
Referenced by ZONE_FILLER::connect_nearby_polys(), DRC_INTERACTIVE_COURTYARD_CLEARANCE::testCourtyardClearances(), DRC_TEST_PROVIDER_COURTYARD_CLEARANCE::testCourtyardClearances(), and DRC_TEST_PROVIDER_COPPER_CLEARANCE::testZonesToZones().
|
inherited |
Perform boolean polyset union between a and b, store the result in it self For aFastMode meaning, see function booleanOp.
Definition at line 997 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::booleanOp().
|
inherited |
Perform boolean polyset union For aFastMode meaning, see function booleanOp.
Definition at line 973 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::booleanOp().
Referenced by DRC_TEST_PROVIDER_SOLDER_MASK::addItemToRTrees(), PAD::addPadPrimitivesToPolygon(), FEATURES_MANAGER::AddShape(), BOOST_AUTO_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), ZONE::BuildSmoothedPoly(), FOOTPRINT::GetCoverageArea(), PCB_TUNING_PATTERN::getOutline(), CADSTAR_PCB_ARCHIVE_LOADER::loadCoppers(), PCB_IO_EASYEDAPRO_PARSER::ParseBoard(), ALTIUM_PCB::ParseRegions6Data(), PCB_IO_KICAD_SEXPR_PARSER::parseZONE(), DXF_PLOTTER::PlotPoly(), PlotSolderMaskLayer(), POLYGON_MERGE_ROUTINE::ProcessSubsequentPolygon(), and ZONE::RemoveCutout().
|
inherited |
Perform boolean polyset intersection between a and b, store the result in it self For aFastMode meaning, see function booleanOp.
Definition at line 1011 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::booleanOp().
|
inherited |
Perform boolean polyset intersection For aFastMode meaning, see function booleanOp.
Definition at line 985 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::booleanOp().
Referenced by ZONE_FILLER::addHatchFillTypeOnZone(), BOOST_AUTO_TEST_CASE(), EXPORTER_STEP::buildBoard3DShapes(), ZONE::BuildSmoothedPoly(), CADSTAR_PCB_ARCHIVE_LOADER::calculateZonePriorities(), TEARDROP_MANAGER::computeAnchorPoints(), ConvertPolygonToBlocks(), FOOTPRINT::CoverageRatio(), EXPORTER_PCB_VRML::ExportStandardLayers(), ZONE_FILLER::Fill(), ZONE_FILLER::fillCopperZone(), PCB_BASE_FRAME::FocusOnItems(), isCopperOutside(), playground_main_func(), POLYGON_INTERSECT_ROUTINE::ProcessSubsequentPolygon(), PAD::Recombine(), RENDER_3D_OPENGL::reload(), and TransformOvalToPolygon().
|
privateinherited |
Definition at line 859 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::booleanOp().
|
privateinherited |
Definition at line 865 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::ArcCount(), SHAPE_POLY_SET::importTree(), CLIPPER_Z_VALUE::m_FirstArcIdx, SHAPE_POLY_SET::m_polys, CLIPPER_Z_VALUE::m_SecondArcIdx, and SHAPE_POLY_SET::OutlineCount().
|
privateinherited |
This is the engine to execute all polygon boolean transforms (AND, OR, ... and polygon simplification (merging overlapping polygons).
aType | is the transform type ( see ClipperLib::ClipType ) |
aOtherShape | is the SHAPE_LINE_CHAIN to combine with me. |
aFastMode | is an option to choose if the result can be a weak polygon or a strictly simple polygon. if aFastMode is PM_FAST the result can be a weak polygon if aFastMode is PM_STRICTLY_SIMPLE (default) the result is (theoretically) a strictly simple polygon, but calculations can be really significantly time consuming |
Definition at line 747 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::booleanOp().
Referenced by SHAPE_POLY_SET::BooleanAdd(), SHAPE_POLY_SET::BooleanIntersection(), SHAPE_POLY_SET::booleanOp(), SHAPE_POLY_SET::BooleanSubtract(), SHAPE_POLY_SET::BooleanXor(), and SHAPE_POLY_SET::Simplify().
|
privateinherited |
Definition at line 754 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::ArcCount(), SHAPE_POLY_SET::importTree(), CLIPPER_Z_VALUE::m_FirstArcIdx, SHAPE_POLY_SET::m_polys, CLIPPER_Z_VALUE::m_SecondArcIdx, SHAPE_POLY_SET::OutlineCount(), and SHAPE_POLY_SET::PM_STRICTLY_SIMPLE.
|
inherited |
Perform boolean polyset difference between a and b, store the result in it self For aFastMode meaning, see function booleanOp.
Definition at line 1004 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::booleanOp().
|
inherited |
Perform boolean polyset difference For aFastMode meaning, see function booleanOp.
Definition at line 979 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::booleanOp().
Referenced by ZONE_FILLER::addHatchFillTypeOnZone(), addHoleToPolygon(), EXPORTER_STEP::buildBoard3DShapes(), ZONE::BuildSmoothedPoly(), CADSTAR_PCB_ARCHIVE_LOADER::calculateZonePriorities(), BITMAPCONV_INFO::createOutputData(), TRACKS_CLEANER::deleteTracksInPads(), PAD::doCheckPad(), EXPORTER_PCB_VRML::ExportVrmlSolderMask(), ZONE_FILLER::fillCopperZone(), ZONE_FILLER::fillNonCopperZone(), PCB_BASE_FRAME::FocusOnItems(), RENDER_3D_OPENGL::generateViasAndPads(), AR_AUTOPLACER::genModuleOnRoutingMatrix(), APERTURE_MACRO::GetApertureMacroShape(), KIGFX::knockoutText(), ZONE_FILLER::knockoutThermalReliefs(), SHAPE_POLY_SET::NormalizeAreaOutlines(), PCB_IO_EASYEDAPRO_PARSER::ParseBoard(), ZONE_CREATE_HELPER::performZoneCutout(), POLYGON_SUBTRACT_ROUTINE::ProcessSubsequentPolygon(), RENDER_3D_OPENGL::reload(), RENDER_3D_RAYTRACE_BASE::Reload(), KIGFX::VIEW::SetCenter(), ZONE_FILLER::subtractHigherPriorityZones(), and PCB_TEXT::TransformTextToPolySet().
|
inherited |
Perform boolean polyset exclusive or between a and b, store the result in it self For aFastMode meaning, see function booleanOp.
Definition at line 1018 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::booleanOp().
|
inherited |
Perform boolean polyset exclusive or For aFastMode meaning, see function booleanOp.
Definition at line 991 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::booleanOp().
Referenced by playground_main_func().
|
overridevirtual |
Implements KIFONT::GLYPH.
Definition at line 126 of file glyph.cpp.
References SHAPE_POLY_SET::BBox(), BOX2< Vec >::GetOrigin(), and BOX2< Vec >::GetSize().
|
inherited |
Construct BBoxCaches for Contains(), below.
Definition at line 2616 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::CHole(), SHAPE_POLY_SET::COutline(), SHAPE_LINE_CHAIN::GenerateBBoxCache(), SHAPE_POLY_SET::HoleCount(), and SHAPE_POLY_SET::OutlineCount().
Referenced by ZONE_FILLER::fillCopperZone(), and DRC_TEST_PROVIDER_COPPER_CLEARANCE::testZonesToZones().
|
staticinherited |
Build a SHAPE_POLY_SET from a bunch of outlines in provided in random order.
aPath | set of closed outlines forming the polygon. Positive orientation = outline, negative = hole |
aReverseOrientation | inverts the sign of the orientation of aPaths (so negative = outline) |
aEvenOdd | forces the even-off fill rule (default is non zero) |
Definition at line 3502 of file shape_poly_set.cpp.
References SHAPE_LINE_CHAIN::Append(), SHAPE_POLY_SET::Hole(), SHAPE_POLY_SET::NewHole(), SHAPE_POLY_SET::NewOutline(), SHAPE_POLY_SET::Outline(), and path.
Referenced by convertPolygon().
|
protectedinherited |
Definition at line 3228 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::AddHole(), SHAPE_POLY_SET::checksum(), SHAPE_POLY_SET::ClearArcs(), SHAPE_POLY_SET::DeletePolygon(), SHAPE_POLY_SET::Fracture(), SHAPE_POLY_SET::HasHoles(), SHAPE_POLY_SET::Hole(), SHAPE_POLY_SET::HoleCount(), SHAPE_POLY_SET::IsSelfIntersecting(), SHAPE_POLY_SET::m_hash, SHAPE_POLY_SET::m_hashValid, SHAPE_POLY_SET::m_triangulatedPolys, SHAPE_POLY_SET::m_triangulationMutex, SHAPE_POLY_SET::m_triangulationValid, SHAPE_POLY_SET::Outline(), SHAPE_POLY_SET::OutlineCount(), partitionPolyIntoRegularCellGrid(), SHAPE_POLY_SET::PM_FAST, SHAPE_POLY_SET::Polygon(), SHAPE_POLY_SET::Simplify(), SHAPE_POLY_SET::SimplifyOutlines(), POLYGON_TRIANGULATION::TesselatePolygon(), TRIANGULATE_TRACE, and TRIANGULATESIMPLIFICATIONLEVEL.
Referenced by SHAPE_POLY_SET::CacheTriangulation(), and CacheTriangulation().
|
overridevirtual |
Build a polygon triangulation, needed to draw a polygon on OpenGL and in some other calculations.
aPartition | = true to created a trinagulation in a partition on a grid false to create a more basic triangulation of the polygons Note in partition calculations the grid size is hard coded to 1e7. This is a good value for Pcbnew: 1cm, in internal units. But not good for Gerbview (1e7 = 10cm), however using a partition is not useful. |
aSimplify | = force the algorithm to simplify the POLY_SET before triangulating |
Reimplemented from SHAPE_POLY_SET.
Definition at line 153 of file glyph.cpp.
References SHAPE_POLY_SET::CacheTriangulation(), and SHAPE_POLY_SET::TriangulatedPolyCount().
Referenced by Triangulate().
void OUTLINE_GLYPH::CacheTriangulation | ( | std::vector< std::unique_ptr< SHAPE_POLY_SET::TRIANGULATED_POLYGON > > & | aHintData | ) |
Cache the triangulation for the glyph from a known set of triangle indexes.
(See GetTriangulationData() above for more info.)
Definition at line 176 of file glyph.cpp.
References SHAPE_POLY_SET::cacheTriangulation().
|
inherited |
Definition at line 703 of file wrlfacet.cpp.
References IFSG_NODE::AddChildNode(), IFSG_INDEX::AddIndex(), IFSG_NODE::AddRefNode(), SHAPE::facets, IFSG_NODE::GetRawPtr(), S3D::GetSGNodeParent(), IFSG_FACESET::NewNode(), IFSG_SHAPE::NewNode(), IFSG_COLORS::SetColorList(), IFSG_COORDS::SetCoordsList(), IFSG_NORMALS::SetNormalList(), SGPOINT::x, SGPOINT::y, and SGPOINT::z.
Referenced by WRL2FACESET::TranslateToSG(), X3DIFACESET::TranslateToSG(), and WRL1FACESET::TranslateToSG().
|
inlinevirtualinherited |
Compute a center-of-mass of the shape.
Definition at line 232 of file shape.h.
References SHAPE::BBox(), and BOX2< Vec >::Centre().
Referenced by PNS::TOPOLOGY::AssembleDiffPair(), Collide(), SCH_EASYEDA_PARSER::ParseSchematic(), and pickSegment().
|
inherited |
Return a chamfered version of the polygon set.
aDistance | is the chamfering distance. |
Definition at line 2918 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::ChamferPolygon(), and SHAPE_POLY_SET::m_polys.
Referenced by ZONE_FILLER::addHatchFillTypeOnZone().
|
privateinherited |
Return the chamfered or filleted version of the aIndex-th polygon in the set, depending on the aMode selected.
aMode | represent which action will be taken: CORNER_MODE::CHAMFERED will return a chamfered version of the polygon, CORNER_MODE::FILLETED will return a filleted version of the polygon. |
aDistance | is the chamfering distance if aMode = CHAMFERED; if aMode = FILLETED, is the filleting radius. |
aIndex | is the index of the polygon that will be chamfered/filleted. |
aErrorMax | is the maximum allowable deviation of the polygon from the circle if aMode = FILLETED. If aMode = CHAMFERED, it is unused. |
Definition at line 2940 of file shape_poly_set.cpp.
References std::abs(), SHAPE_LINE_CHAIN::Append(), SHAPE_POLY_SET::CHAMFERED, SHAPE_LINE_CHAIN::CPoint(), distance(), GetArcToSegmentCount(), KiROUND(), SHAPE_POLY_SET::Polygon(), RADIANS_T, SHAPE_POLY_SET::RemoveNullSegments(), SHAPE_LINE_CHAIN::SetClosed(), and VECTOR2< T >::x.
Referenced by SHAPE_POLY_SET::ChamferPolygon(), and SHAPE_POLY_SET::FilletPolygon().
|
inherited |
Return a chamfered version of the aIndex-th polygon.
aDistance | is the chamfering distance. |
aIndex | is the index of the polygon to be chamfered. |
Definition at line 2765 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::CHAMFERED, and SHAPE_POLY_SET::chamferFilletPolygon().
Referenced by SHAPE_POLY_SET::Chamfer().
|
privateinherited |
Definition at line 3357 of file shape_poly_set.cpp.
References MMH3_HASH::add(), MMH3_HASH::digest(), SHAPE_POLY_SET::m_polys, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by SHAPE_POLY_SET::cacheTriangulation(), SHAPE_POLY_SET::DeletePolygonAndTriangulationData(), SHAPE_POLY_SET::GetHash(), SHAPE_POLY_SET::IsTriangulationUpToDate(), SHAPE_POLY_SET::Move(), and SHAPE_POLY_SET::UpdateTriangulationDataHash().
|
inlineinherited |
Definition at line 780 of file shape_poly_set.h.
References SHAPE_POLY_SET::m_polys.
Referenced by TRIANGLE_DISPLAY_LIST::AddToMiddleContourns(), PNS_LOG_VIEWER_OVERLAY::AnnotatedPolyset(), SHAPE_POLY_SET::BuildBBoxCaches(), collide(), SHAPE_POLY_SET::containsSingle(), KIGFX::PCB_PAINTER::draw(), CADSTAR_PCB_ARCHIVE_LOADER::getZoneFromCadstarShape(), GEOM_TEST::IsPolySetValid(), ZONE_CREATE_HELPER::performZoneCutout(), PlotLayerOutlines(), DRC_TEST_PROVIDER_ANNULAR_WIDTH::Run(), and HYPERLYNX_EXPORTER::writeNetObjects().
|
inlineinherited |
Definition at line 879 of file shape_poly_set.h.
References SHAPE_POLY_SET::CIterate(), and SHAPE_POLY_SET::OutlineCount().
Referenced by SHAPE_POLY_SET::CIterate(), and SHAPE_POLY_SET::CIterateWithHoles().
|
inlineinherited |
Definition at line 855 of file shape_poly_set.h.
References SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::m_currentContour, SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::m_currentPolygon, SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::m_currentVertex, SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::m_iterateHoles, SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::m_lastPolygon, SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::m_poly, and SHAPE_POLY_SET::OutlineCount().
Referenced by doConvertOutlineToPolygon(), EDA_SHAPE::DupPolyPointsList(), and EDA_SHAPE::getBoundingBox().
|
inlineinherited |
Definition at line 869 of file shape_poly_set.h.
References SHAPE_POLY_SET::CIterate().
|
inlineinherited |
Returns an iterator object, for all outlines in the set (no holes)
Definition at line 960 of file shape_poly_set.h.
References SHAPE_POLY_SET::CIterateSegments(), and SHAPE_POLY_SET::OutlineCount().
Referenced by SHAPE_POLY_SET::CIterateSegments(), and SHAPE_POLY_SET::CIterateSegmentsWithHoles().
|
inlineinherited |
Return an iterator object, for iterating between aFirst and aLast outline, with or without holes (default: without)
Definition at line 926 of file shape_poly_set.h.
References SHAPE_POLY_SET::SEGMENT_ITERATOR_TEMPLATE< T >::m_currentContour, SHAPE_POLY_SET::SEGMENT_ITERATOR_TEMPLATE< T >::m_currentPolygon, SHAPE_POLY_SET::SEGMENT_ITERATOR_TEMPLATE< T >::m_currentSegment, SHAPE_POLY_SET::SEGMENT_ITERATOR_TEMPLATE< T >::m_iterateHoles, SHAPE_POLY_SET::SEGMENT_ITERATOR_TEMPLATE< T >::m_lastPolygon, SHAPE_POLY_SET::SEGMENT_ITERATOR_TEMPLATE< T >::m_poly, and SHAPE_POLY_SET::OutlineCount().
Referenced by BRDITEMS_PLOTTER::PlotShape(), projectPointOnSegment(), and segPolyIntersection().
|
inlineinherited |
Return an iterator object, for iterating aPolygonIdx-th polygon edges.
Definition at line 948 of file shape_poly_set.h.
References SHAPE_POLY_SET::CIterateSegments().
|
inlineinherited |
Return an iterator object, for the aOutline-th outline in the set (with holes).
Definition at line 978 of file shape_poly_set.h.
References SHAPE_POLY_SET::CIterateSegments(), and SHAPE_POLY_SET::OutlineCount().
Referenced by CreepageGraph::Addshape(), SHAPE_POLY_SET::CollideEdge(), SHAPE_POLY_SET::IsPolygonSelfIntersecting(), and SHAPE_POLY_SET::SquaredDistanceToPolygon().
|
inlineinherited |
Return an iterator object, for the aOutline-th outline in the set (with holes).
Definition at line 984 of file shape_poly_set.h.
References SHAPE_POLY_SET::CIterateSegments().
|
inlineinherited |
Definition at line 884 of file shape_poly_set.h.
References SHAPE_POLY_SET::CIterate(), and SHAPE_POLY_SET::OutlineCount().
Referenced by SHAPE_POLY_SET::CollideVertex().
|
inlineinherited |
Definition at line 874 of file shape_poly_set.h.
References SHAPE_POLY_SET::CIterate().
Referenced by POLYGON_POINT_EDIT_BEHAVIOR::BuildForPolyOutline(), ZONE::CIterateWithHoles(), PCB_GRID_HELPER::computeAnchors(), and hash_fp_item().
|
inherited |
Removes all arc references from all the outlines and holes in the polyset.
Definition at line 631 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::ClearArcs(), and SHAPE_POLY_SET::m_polys.
Referenced by BOOST_AUTO_TEST_CASE(), EXPORTER_STEP::buildBoard3DShapes(), ZONE::BuildSmoothedPoly(), SHAPE_POLY_SET::cacheTriangulation(), SHAPE_POLY_SET::ClearArcs(), collidesWithArea(), CONVERT_TOOL::CreatePolys(), ZONE_FILLER::fillNonCopperZone(), CADSTAR_PCB_ARCHIVE_LOADER::getPolySetFromCadstarShape(), isCopperOutside(), CADSTAR_PCB_ARCHIVE_LOADER::loadCoppers(), and ZONE_FILLER::subtractHigherPriorityZones().
|
overridevirtualinherited |
Return a dynamically allocated copy of the shape.
copy | of the shape |
Reimplemented from SHAPE.
Definition at line 151 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::SHAPE_POLY_SET().
|
inherited |
Definition at line 157 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::SHAPE_POLY_SET(), and SHAPE_POLY_SET::SINGLETON.
Referenced by ZONE_FILLER::addHatchFillTypeOnZone(), FEATURES_MANAGER::AddShape(), ZONE::BuildSmoothedPoly(), collidesWithArea(), AR_AUTOPLACER::drawPlacementRoutingMatrix(), ZONE_FILLER::fillCopperZone(), AR_AUTOPLACER::fillMatrix(), GERBER_PLOTTER::FlashPadCustom(), FEATURES_MANAGER::InitFeatureList(), isCopperOutside(), BRDITEMS_PLOTTER::PlotShape(), PlotStandardLayer(), RENDER_3D_OPENGL::reload(), DRC_TEST_PROVIDER_DISALLOW::Run(), DRC_TEST_PROVIDER_TEXT_DIMS::Run(), HYPERLYNX_EXPORTER::writeNetObjects(), and GBR_TO_PCB_EXPORTER::writePcbZoneItem().
|
overridevirtualinherited |
Check whether the segment aSeg collides with the polygon set (or its edge).
Note that prior to Jul 2020 we considered the edge to not be part of the polygon. However, most other shapes (rects, circles, segments, etc.) include their edges and the difference was causing issues when used for DRC.
(FWIW, SHAPE_LINE_CHAIN was a split personality, with Collide() including its edges but PointInside() not. That has also been corrected.)
aSeg | is the SEG segment whose collision with respect to the poly set will be tested. |
aClearance | is the security distance; if the segment passes closer to the polygon than aClearance distance, then there is a collision. |
aActual | an optional pointer to an int to store the actual distance in the event of a collision. |
Implements SHAPE.
Definition at line 2284 of file shape_poly_set.cpp.
References SEG::Square(), and SHAPE_POLY_SET::SquaredDistanceToSeg().
|
virtualinherited |
Check if the boundary of shape (this) lies closer to the shape aShape than aClearance, indicating a collision.
aShape | shape to check collision against |
aClearance | minimum clearance |
aMTV | [out] minimum translation vector |
aActual | [out] an optional pointer to an int to store the actual distance in the event of a collision. |
aLocation | [out] an option pointer to a point to store a nearby location in the event of a collision. |
Reimplemented in SHAPE_COMPOUND, SHAPE_RECT, and SHAPE_SEGMENT.
Definition at line 1172 of file shape_collisions.cpp.
References collideShapes().
|
overridevirtualinherited |
Check if the boundary of shape (this) lies closer to the shape aShape than aClearance, indicating a collision.
aShape | shape to check collision against |
aClearance | minimum clearance |
aActual | [out] an optional pointer to an int to store the actual distance in the event of a collision. |
aLocation | [out] an option pointer to a point to store a nearby location in the event of a collision. |
Reimplemented from SHAPE.
Definition at line 2329 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::CacheTriangulation(), SHAPE_POLY_SET::Collide(), SHAPE::Collide(), SHAPE_CIRCLE::GetCenter(), SHAPE_CIRCLE::GetRadius(), SHAPE_SEGMENT::GetSeg(), SHAPE_SEGMENT::GetWidth(), SHAPE_POLY_SET::m_triangulatedPolys, SH_CIRCLE, SH_SEGMENT, and SHAPE_BASE::Type().
Referenced by SHAPE_POLY_SET::Collide(), collideSingleShapes(), collidesWithArea(), collidesWithCourtyard(), PAD::doCheckPad(), DRAWING_TOOL::DrawVia(), ZONE_FILLER::Fill(), ZONE::GetInteractingZones(), EDA_SHAPE::hitTest(), DS_DRAW_ITEM_POLYPOLYGONS::HitTest(), FOOTPRINT::HitTestAccurate(), PCB_SELECTION_TOOL::hitTestDistance(), ZONE_FILLER::knockoutThermalReliefs(), DRC_TEST_PROVIDER_ANNULAR_WIDTH::Run(), DRC_INTERACTIVE_COURTYARD_CLEARANCE::testCourtyardClearances(), DRC_TEST_PROVIDER_COURTYARD_CLEARANCE::testCourtyardClearances(), and DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testItemAgainstZones().
|
overridevirtualinherited |
Check whether the point aP is either inside or on the edge of the polygon set.
Note that prior to Jul 2020 we considered the edge to not be part of the polygon. However, most other shapes (rects, circles, segments, etc.) include their edges and the difference was causing issues when used for DRC.
(FWIW, SHAPE_LINE_CHAIN was a split personality, with Collide() including its edges but PointInside() not. That has also been corrected.)
aP | is the VECTOR2I point whose collision with respect to the poly set will be tested. |
aClearance | is the security distance; if the point lies closer to the polygon than aClearance distance, then there is a collision. |
aActual | an optional pointer to an int to store the actual distance in the event of a collision. |
Reimplemented from SHAPE.
Definition at line 2305 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::IsEmpty(), SEG::Square(), SHAPE_POLY_SET::SquaredDistance(), and SHAPE_POLY_SET::VertexCount().
|
inherited |
Check whether aPoint collides with any edge of any of the contours of the polygon.
aPoint | is the VECTOR2I point whose collision with respect to the polygon will be tested. |
aClearance | is the security distance; if aPoint lies closer to a vertex than aClearance distance, then there is a collision. |
aClosestVertex | is the index of the closes vertex to aPoint . |
Definition at line 2583 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::CIterateSegmentsWithHoles(), SEG::Square(), and SEG::SquaredDistance().
Referenced by EDA_SHAPE::hitTest(), ZONE::HitTestForEdge(), and SCH_EDIT_FRAME::RecalculateConnections().
|
inherited |
Check whether aPoint collides with any vertex of any of the contours of the polygon.
aPoint | is the VECTOR2I point whose collision with respect to the polygon will be tested. |
aClearance | is the security distance; if aPoint lies closer to a vertex than aClearance distance, then there is a collision. |
aClosestVertex | is the index of the closes vertex to aPoint . |
Definition at line 2543 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::CIterateWithHoles(), delta, and SEG::Square().
Referenced by ZONE::HitTestForCorner().
|
inherited |
Return true if a given subpolygon contains the point aP.
aP | is the point to check |
aSubpolyIndex | is the subpolygon to check, or -1 to check all |
aUseBBoxCaches | gives faster performance when multiple calls are made with no editing in between, but the caller MUST cache the bbox caches before calling (via BuildBBoxCaches(), above) |
Definition at line 2628 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::containsSingle(), SHAPE_POLY_SET::m_polys, and SHAPE_POLY_SET::OutlineCount().
Referenced by CollectKnockedOutSegments(), ZONE_FILLER::fillCopperZone(), CADSTAR_PCB_ARCHIVE_LOADER::getKiCadPad(), GERBER_DRAW_ITEM::HitTest(), ZONE::HitTestFilledArea(), PATH_CONNECTION::isValid(), segPolyIntersection(), and BOARD::TestZoneIntersection().
|
privateinherited |
Check whether the point aP is inside the aSubpolyIndex-th polygon of the polyset.
If the points lies on an edge, the polygon is considered to contain it.
aP | is the VECTOR2I point whose position with respect to the inside of the aSubpolyIndex-th polygon will be tested. |
aSubpolyIndex | is an integer specifying which polygon in the set has to be checked. |
aAccuracy | accuracy in internal units |
aUseBBoxCaches | gives faster performance when multiple calls are made with no editing in between, but the caller MUST cache the bbox caches before calling (via BuildBBoxCaches(), above) |
Definition at line 2684 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::CHole(), SHAPE_POLY_SET::HoleCount(), SHAPE_POLY_SET::m_polys, SHAPE_LINE_CHAIN_BASE::PointInside(), and SHAPE_POLY_SET::PointInside().
Referenced by SHAPE_POLY_SET::Contains(), and SHAPE_POLY_SET::SquaredDistanceToPolygon().
|
inlineinherited |
Definition at line 775 of file shape_poly_set.h.
References SHAPE_POLY_SET::m_polys.
Referenced by PAD::AddPrimitivePoly(), FEATURES_MANAGER::AddShape(), TRIANGLE_DISPLAY_LIST::AddToMiddleContourns(), PNS_LOG_VIEWER_OVERLAY::AnnotatedPolyset(), SHAPE_POLY_SET::BuildBBoxCaches(), BuildConvexHull(), PAD::buildEffectiveShape(), convertPolygon(), ConvertPolygonToBlocks(), MULTICHANNEL_TOOL::copyRuleAreaContents(), GENCAD_EXPORTER::CreatePadsShapesSection(), CONVERT_TOOL::CreatePolys(), KIGFX::PCB_PAINTER::Draw(), KIGFX::PCB_PAINTER::draw(), KIGFX::GERBVIEW_PAINTER::draw(), KIGFX::GERBVIEW_PAINTER::drawApertureMacro(), KIGFX::CAIRO_GAL_BASE::DrawPolygon(), KIGFX::OPENGL_GAL::DrawPolygon(), KIGFX::GERBVIEW_PAINTER::drawPolygon(), KIGFX::PREVIEW::POLYGON_ITEM::drawPreviewShape(), EDA_SHAPE::DupPolyPointsList(), EXPORTER_PCB_VRML::ExportVrmlBoard(), EXPORTER_PCB_VRML::ExportVrmlPolygonSet(), FOOTPRINT::GetBoundingHull(), SHAPE::GetClearance(), FOOTPRINT::GetEffectiveShape(), EDA_SHAPE::GetLength(), CADSTAR_PCB_ARCHIVE_LOADER::getZoneFromCadstarShape(), API_HANDLER_PCB::handleGetPadShapeAsPolygon(), DS_DRAW_ITEM_POLYPOLYGONS::HitTest(), EDA_SHAPE::hitTest(), CONNECTIVITY_DATA::IsConnectedOnLayer(), FABMASTER::loadGraphics(), FABMASTER::loadPolygon(), PCB_IO_EAGLE::loadPolygon(), EDA_SHAPE::makeEffectiveShapes(), SCH_RULE_AREA::MakeEffectiveShapes(), DSN::SPECCTRA_DB::makePADSTACK(), SHAPE_LINE_CHAIN::OffsetLine(), PCB_IO_EASYEDA_PARSER::ParseToBoardItemContainer(), PlotLayerOutlines(), DXF_PLOTTER::PlotPoly(), BRDITEMS_PLOTTER::PlotShape(), SHAPE::PointInside(), SHAPE_POLY_SET::PointInside(), DRC_TEST_PROVIDER_ANNULAR_WIDTH::Run(), SHAPE::SquaredDistance(), DXF_PLOTTER::ThickSegment(), HYPERLYNX_EXPORTER::writeBoardInfo(), HYPERLYNX_EXPORTER::writeNetObjects(), and GBR_TO_PCB_EXPORTER::writePcbPolygon().
|
inlineinherited |
Definition at line 785 of file shape_poly_set.h.
References SHAPE_POLY_SET::m_polys.
Referenced by SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::Advance(), SHAPE_POLY_SET::SEGMENT_ITERATOR_TEMPLATE< T >::Advance(), SHAPE_POLY_SET::GetRelativeIndices(), SHAPE_POLY_SET::HasTouchingHoles(), SHAPE_POLY_SET::SEGMENT_ITERATOR_TEMPLATE< T >::IsAdjacent(), SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::IsEndContour(), STEP_PCB_MODEL::MakeShapes(), SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::operator bool(), and PlotStandardLayer().
|
inlineinherited |
Definition at line 790 of file shape_poly_set.h.
References SHAPE_POLY_SET::m_polys.
Referenced by EXPORTER_STEP::buildFootprint3DShapes(), STEP_PCB_MODEL::CreatePCB(), STEP_PCB_MODEL::MakeShapes(), PCB_IO_EASYEDAPRO_PARSER::ParseBoard(), PCB_IO_EASYEDAPRO_PARSER::ParseFootprint(), and PCB_IO_EASYEDA_PARSER::ParseToBoardItemContainer().
|
inherited |
Return the aGlobalIndex-th vertex in the poly set.
Definition at line 417 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::GetRelativeIndices(), SHAPE_POLY_SET::VERTEX_INDEX::m_contour, SHAPE_POLY_SET::VERTEX_INDEX::m_polygon, SHAPE_POLY_SET::m_polys, and SHAPE_POLY_SET::VERTEX_INDEX::m_vertex.
|
inherited |
Return the index-th vertex in a given hole outline within a given outline.
Definition at line 398 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::m_polys.
Referenced by PCB_POINT_EDITOR::addCorner(), PCB_POINT_EDITOR::chamferCorner(), EDA_SHAPE::Compare(), SHAPE_POLY_SET::CVertex(), D_CODE::DrawFlashedPolygon(), GERBER_FILE_IMAGE::Execute_DCODE_Command(), GERBER_FILE_IMAGE::Execute_G_Command(), findVertex(), ZONE::GetCornerPosition(), EDA_SHAPE::getPosition(), ZONE::HatchBorder(), ZONE::HitTest(), ZONE::MoveEdge(), FOOTPRINT::cmp_drawings::operator()(), FOOTPRINT::cmp_zones::operator()(), EDA_SHAPE::operator==(), SCH_EDITOR_CONTROL::Paste(), ZONE::SetCornerPosition(), shapeNeedsUpdate(), EDA_SHAPE::Similarity(), POLYGON_POINT_EDIT_BEHAVIOR::UpdatePointsFromOutline(), and zoneNeedsUpdate().
|
inherited |
Return the index-th vertex in a given hole outline within a given outline.
Definition at line 429 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::CVertex(), SHAPE_POLY_SET::VERTEX_INDEX::m_contour, SHAPE_POLY_SET::VERTEX_INDEX::m_polygon, and SHAPE_POLY_SET::VERTEX_INDEX::m_vertex.
|
inlineinherited |
Definition at line 1063 of file shape_poly_set.h.
References SHAPE_POLY_SET::Inflate().
Referenced by ZONE_FILLER::addHatchFillTypeOnZone(), FEATURES_MANAGER::AddShape(), DRC_TEST_PROVIDER_SOLDER_MASK::buildRTrees(), collidesWithArea(), KIGFX::PCB_PAINTER::draw(), ZONE_FILLER::fillCopperZone(), ZONE_FILLER::fillNonCopperZone(), PCB_BASE_FRAME::FocusOnItems(), PlotSolderMaskLayer(), DRC_TEST_PROVIDER_DISALLOW::Run(), DRC_TEST_PROVIDER_TEXT_DIMS::Run(), KIGFX::VIEW::SetCenter(), and DIALOG_GLOBAL_EDIT_TEARDROPS::TransferDataFromWindow().
|
inherited |
Delete aIdx-th polygon from the set.
Definition at line 2493 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::m_polys.
Referenced by ZONE_FILLER::addHatchFillTypeOnZone(), BOOST_AUTO_TEST_CASE(), SHAPE_POLY_SET::cacheTriangulation(), ZONE_FILLER::fillCopperZone(), and PlotStandardLayer().
|
inherited |
Delete aIdx-th polygon and its triangulation data from the set.
If called with aUpdateHash false, caller must call UpdateTriangulationDataHash().
Definition at line 2499 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::checksum(), SHAPE_POLY_SET::m_hash, SHAPE_POLY_SET::m_hashValid, SHAPE_POLY_SET::m_polys, SHAPE_POLY_SET::m_triangulatedPolys, and SHAPE_POLY_SET::m_triangulationValid.
|
virtualinherited |
Returns the minimum distance from a given point to this shape.
Always returns zero if the point is inside a closed shape and aOutlineOnly is false.
aP | is the point to test |
Reimplemented in SHAPE_COMPOUND, and SHAPE_LINE_CHAIN.
Definition at line 108 of file shape.cpp.
References SHAPE::SquaredDistance().
|
inherited |
Return a filleted version of the polygon set.
aRadius | is the fillet radius. |
aErrorMax | is the maximum allowable deviation of the polygon from the circle |
Definition at line 2929 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::FilletPolygon(), and SHAPE_POLY_SET::m_polys.
Referenced by ZONE_FILLER::addHatchFillTypeOnZone().
|
inherited |
Return a filleted version of the aIndex-th polygon.
aRadius | is the fillet radius. |
aErrorMax | is the maximum allowable deviation of the polygon from the circle |
aIndex | is the index of the polygon to be filleted |
Definition at line 2771 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::chamferFilletPolygon(), and SHAPE_POLY_SET::FILLETED.
Referenced by SHAPE_POLY_SET::Fillet(), and GEOM_TEST::FilletPolySet().
|
overridevirtualinherited |
Reimplemented from SHAPE.
Definition at line 2144 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::m_polys.
|
inherited |
Convert a set of polygons with holes to a single outline with "slits"/"fractures" connecting the outer ring to the inner holes For aFastMode meaning, see function booleanOp.
Definition at line 1889 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::fractureSingle(), SHAPE_POLY_SET::m_polys, and SHAPE_POLY_SET::Simplify().
Referenced by addHoleToPolygon(), PCB_IO_IPC2581::addKnockoutText(), PAD::addPadPrimitivesToPolygon(), PAD::AddPrimitivePoly(), FEATURES_MANAGER::AddShape(), SHAPE_POLY_SET::cacheTriangulation(), convertPolygon(), BITMAPCONV_INFO::createOutputData(), KIGFX::PCB_PAINTER::draw(), CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarShape(), CALLBACK_GAL::DrawGlyph(), AR_AUTOPLACER::drawPlacementRoutingMatrix(), EXPORTER_PCB_VRML::ExportStandardLayers(), EXPORTER_PCB_VRML::ExportVrmlSolderMask(), ZONE_FILLER::fillCopperZone(), AR_AUTOPLACER::fillMatrix(), ZONE_FILLER::fillNonCopperZone(), APERTURE_MACRO::GetApertureMacroShape(), SHAPE_POLY_SET::InflateWithLinkedHoles(), FEATURES_MANAGER::InitFeatureList(), KIGFX::knockoutText(), CADSTAR_PCB_ARCHIVE_LOADER::loadCoppers(), FABMASTER::loadFootprints(), FABMASTER::loadGraphics(), FABMASTER::loadPolygon(), PCB_IO_EASYEDAPRO_PARSER::ParseBoard(), ALTIUM_PCB::ParseRegions6Data(), PCB_IO_EASYEDA_PARSER::ParseToBoardItemContainer(), DXF_PLOTTER::PlotPoly(), BRDITEMS_PLOTTER::PlotShape(), PlotSolderMaskLayer(), BRDITEMS_PLOTTER::PlotText(), RENDER_3D_RAYTRACE_BASE::Reload(), DRC_TEST_PROVIDER_DISALLOW::Run(), EDA_SHAPE::SetPolyShape(), TransformRingToPolygon(), PAD::TransformShapeToPolygon(), and ZONE::TransformSmoothedOutlineToPolygon().
|
privateinherited |
Definition at line 1881 of file shape_poly_set.cpp.
References ENABLECACHEFRIENDLYFRACTURE, fractureSingleCacheFriendly(), and fractureSingleSlow().
Referenced by SHAPE_POLY_SET::Fracture().
|
inherited |
Return the number of points in the shape poly set.
mainly for reports
Definition at line 364 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::HoleCount(), SHAPE_POLY_SET::m_polys, and SHAPE_POLY_SET::OutlineCount().
Referenced by STEP_PCB_MODEL::AddPolygonShapes(), BOOST_AUTO_TEST_CASE(), EXPORTER_STEP::buildBoard3DShapes(), STEP_PCB_MODEL::CreatePCB(), SHAPE_POLY_SET::IsPolygonSelfIntersecting(), and DRC_TEST_PROVIDER_COPPER_CLEARANCE::testZonesToZones().
|
inherited |
Appends all the arcs in this polyset to aArcBuffer.
Definition at line 618 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::m_polys.
Referenced by BOOST_AUTO_TEST_CASE().
|
inherited |
Return the actual minimum distance between two shapes.
distance | in IU |
POLY_SETs contain a bunch of polygons that are triangulated. But there are way more triangles than necessary for collision detection. Triangles check three vertices each but for the outline, we only need one. These are also fractured, so we don't need to worry about holes
Definition at line 54 of file shape.cpp.
References SHAPE_POLY_SET::COutline(), SHAPE_BASE::GetIndexableSubshapeCount(), SHAPE_BASE::GetIndexableSubshapes(), SHAPE_POLY_SET::OutlineCount(), and SHAPE_BASE::Type().
|
inherited |
Compute the global index of a vertex from the relative indices of polygon, contour and vertex.
aRelativeIndices | is the set of relative indices. |
aGlobalIdx | [out] is the computed global index. |
aGlobalIdx
reference. Definition at line 203 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::VERTEX_INDEX::m_contour, SHAPE_POLY_SET::VERTEX_INDEX::m_polygon, SHAPE_POLY_SET::m_polys, SHAPE_POLY_SET::VERTEX_INDEX::m_vertex, and SHAPE_POLY_SET::Polygon().
Referenced by SHAPE_POLY_SET::GetNeighbourIndexes(), and ZONE::GetSelectedCorner().
|
inherited |
Definition at line 3136 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::checksum(), SHAPE_POLY_SET::m_hash, and SHAPE_POLY_SET::m_hashValid.
Referenced by FOOTPRINT::BuildCourtyardCaches(), ZONE::BuildHashValue(), FOOTPRINT::GetCourtyard(), ZONE::GetHashValue(), DSN::SPECCTRA_DB::makePADSTACK(), and SHAPE_POLY_SET::SHAPE_POLY_SET().
|
overridevirtualinherited |
Reimplemented from SHAPE_BASE.
Definition at line 3424 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::m_triangulatedPolys.
Referenced by SHAPE_POLY_SET::GetIndexableSubshapes().
|
overridevirtualinherited |
Reimplemented from SHAPE_BASE.
Definition at line 3435 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::GetIndexableSubshapeCount(), and SHAPE_POLY_SET::m_triangulatedPolys.
|
inherited |
Return the global indexes of the previous and the next corner of the aGlobalIndex-th corner of a contour in the polygon set.
They are often aGlobalIndex-1 and aGlobalIndex+1, but not for the first and last corner of the contour.
aGlobalIndex | is index of the corner, globally indexed between all edges in all contours |
aPrevious | is the globalIndex of the previous corner of the same contour. |
aNext | is the globalIndex of the next corner of the same contour. |
Definition at line 435 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::GetGlobalIndex(), SHAPE_POLY_SET::GetRelativeIndices(), SHAPE_POLY_SET::VERTEX_INDEX::m_contour, SHAPE_POLY_SET::VERTEX_INDEX::m_polygon, SHAPE_POLY_SET::m_polys, SHAPE_POLY_SET::VERTEX_INDEX::m_vertex, and next().
Referenced by BOOST_AUTO_TEST_CASE(), PCB_POINT_EDITOR::chamferCorner(), and ZONE::MoveEdge().
|
inherited |
Convert a global vertex index —i.e., a number that globally identifies a vertex in a concatenated list of all vertices in all contours— and get the index of the vertex relative to the contour relative to the polygon in which it is.
aGlobalIdx | is the global index of the corner whose structured index wants to be found |
aRelativeIndices | is a pointer to the set of relative indices to store. |
Definition at line 163 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::CPolygon(), SHAPE_POLY_SET::VERTEX_INDEX::m_contour, SHAPE_POLY_SET::VERTEX_INDEX::m_polygon, SHAPE_POLY_SET::VERTEX_INDEX::m_vertex, SHAPE_POLY_SET::OutlineCount(), and SHAPE_LINE_CHAIN::PointCount().
Referenced by SHAPE_POLY_SET::CVertex(), ZONE::GetCornerPosition(), SHAPE_POLY_SET::GetNeighbourIndexes(), SHAPE_POLY_SET::InsertVertex(), SHAPE_POLY_SET::IsVertexInHole(), SHAPE_POLY_SET::IterateFromVertexWithHoles(), SHAPE_POLY_SET::RemoveVertex(), ZONE::SetCornerPosition(), ZONE::SetSelectedCorner(), and SHAPE_POLY_SET::SetVertex().
std::vector< std::unique_ptr< SHAPE_POLY_SET::TRIANGULATED_POLYGON > > OUTLINE_GLYPH::GetTriangulationData | ( | ) | const |
Definition at line 165 of file glyph.cpp.
References SHAPE_POLY_SET::m_triangulatedPolys.
|
inherited |
Return true if the polygon set has any holes.
Definition at line 2065 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::m_polys.
Referenced by PAD::AddPrimitivePoly(), SHAPE_POLY_SET::cacheTriangulation(), CALLBACK_GAL::DrawGlyph(), and SHAPE_LINE_CHAIN::OffsetLine().
|
overridevirtualinherited |
Reimplemented from SHAPE_BASE.
Definition at line 3418 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::IsTriangulationUpToDate().
|
inherited |
Return true if the polygon set has any holes that share a vertex.
Definition at line 3385 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::CPolygon(), SHAPE_POLY_SET::hasTouchingHoles(), and SHAPE_POLY_SET::OutlineCount().
|
privateinherited |
Return true if the polygon set has any holes that touch share a vertex.
Definition at line 3397 of file shape_poly_set.cpp.
Referenced by SHAPE_POLY_SET::HasTouchingHoles().
|
inlineinherited |
Return the reference to aHole-th hole in the aIndex-th outline.
Definition at line 754 of file shape_poly_set.h.
References SHAPE_POLY_SET::m_polys.
Referenced by SHAPE_POLY_SET::Area(), BuildFootprintPolygonOutlines(), SHAPE_POLY_SET::BuildPolysetFromOrientedPaths(), SHAPE_POLY_SET::cacheTriangulation(), ConvertPolygonToBlocks(), CONVERT_TOOL::CreatePolys(), EXPORTER_PCB_VRML::ExportVrmlBoard(), DSN::SPECCTRA_DB::fillBOUNDARY(), DIALOG_BOARD_STATISTICS::getDataFromPCB(), CADSTAR_PCB_ARCHIVE_LOADER::getPolySetFromCadstarShape(), ZONE::HitTestCutout(), FABMASTER::loadFootprints(), FABMASTER::loadShapePolySet(), polygonArea(), ZONE::RemoveCutout(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testZoneLayer(), and TransformRingToPolygon().
|
inlineinherited |
Returns the number of holes in a given outline.
Definition at line 715 of file shape_poly_set.h.
References SHAPE_POLY_SET::m_polys.
Referenced by TRIANGLE_DISPLAY_LIST::AddToMiddleContourns(), PNS_LOG_VIEWER_OVERLAY::AnnotatedPolyset(), ZONE::AppendCorner(), SHAPE_POLY_SET::Area(), BOOST_AUTO_TEST_CASE(), SHAPE_POLY_SET::BuildBBoxCaches(), BuildFootprintPolygonOutlines(), SHAPE_POLY_SET::cacheTriangulation(), collide(), SHAPE_POLY_SET::containsSingle(), ConvertPolygonToBlocks(), CONVERT_TOOL::CreatePolys(), KIGFX::PCB_PAINTER::draw(), EXPORTER_PCB_VRML::ExportVrmlBoard(), DSN::SPECCTRA_DB::fillBOUNDARY(), SHAPE_POLY_SET::FullPointCount(), DIALOG_BOARD_STATISTICS::getDataFromPCB(), CADSTAR_PCB_ARCHIVE_LOADER::getPolySetFromCadstarShape(), CADSTAR_PCB_ARCHIVE_LOADER::getZoneFromCadstarShape(), ZONE::HitTestCutout(), GEOM_TEST::IsPolySetValid(), ZONE_CREATE_HELPER::performZoneCutout(), PlotLayerOutlines(), polygonArea(), POLYGON_SUBTRACT_ROUTINE::ProcessSubsequentPolygon(), DRC_RTREE::QueryColliding(), ZONE::RemoveCutout(), DRC_TEST_PROVIDER_ANNULAR_WIDTH::Run(), DRC_TEST_PROVIDER_TEXT_DIMS::Run(), EDA_SHAPE::SetPolyShape(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testZoneLayer(), and HYPERLYNX_EXPORTER::writeNetObjects().
|
privateinherited |
Definition at line 1402 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::m_polys, and path.
|
privateinherited |
Definition at line 1368 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::importPolyPath(), and SHAPE_POLY_SET::m_polys.
Referenced by SHAPE_POLY_SET::importPolyPath(), and SHAPE_POLY_SET::importTree().
|
privateinherited |
Definition at line 1391 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::importPolyPath(), and SHAPE_POLY_SET::m_polys.
|
privateinherited |
Definition at line 1344 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::m_polys.
Referenced by SHAPE_POLY_SET::booleanOp(), SHAPE_POLY_SET::inflate1(), SHAPE_POLY_SET::inflate2(), and SHAPE_POLY_SET::inflateLine2().
|
inherited |
Perform outline inflation/deflation.
Polygons can have holes, but not linked holes with main outlines, if aFactor < 0. For those use InflateWithLinkedHoles() to avoid odd corners where the link segments meet the outline.
aAmount | is the number of units to offset edges. |
aCornerStrategy | ALLOW_ACUTE_CORNERS to preserve all angles, CHAMFER_ACUTE_CORNERS to chop angles less than 90°, ROUND_ACUTE_CORNERS to round off angles less than 90°, ROUND_ALL_CORNERS to round regardless of angles |
aMaxError | is the allowable deviation when rounding corners with an approximated polygon |
Definition at line 1326 of file shape_poly_set.cpp.
References std::abs(), FULL_CIRCLE, GetArcToSegmentCount(), and SHAPE_POLY_SET::inflate2().
Referenced by BOARD_ADAPTER::addShape(), ZONE_FILLER::buildCopperItemClearances(), FOOTPRINT::BuildCourtyardCaches(), ZONE::BuildSmoothedPoly(), CADSTAR_PCB_ARCHIVE_LOADER::calculateZonePriorities(), BOARD_ADAPTER::createPadWithMargin(), CONVERT_TOOL::CreatePolys(), SHAPE_POLY_SET::Deflate(), KIGFX::PCB_PAINTER::draw(), ZONE_FILLER::fillCopperZone(), ZONE_FILLER::fillNonCopperZone(), CADSTAR_PCB_ARCHIVE_LOADER::getPolySetFromCadstarShape(), SHAPE_POLY_SET::InflateWithLinkedHoles(), PATH_CONNECTION::isValid(), CADSTAR_PCB_ARCHIVE_LOADER::loadCoppers(), PCB_IO_EAGLE::loadPolygon(), PCB_IO_EAGLE::packagePolygon(), PCB_IO_EASYEDAPRO_PARSER::ParseBoard(), ALTIUM_PCB::ParsePolygons6Data(), BRDITEMS_PLOTTER::PlotShape(), DRC_TEST_PROVIDER_TEXT_DIMS::Run(), DIALOG_GLOBAL_EDIT_TEARDROPS::TransferDataFromWindow(), EDA_SHAPE::TransformShapeToPolygon(), PAD::TransformShapeToPolygon(), ZONE::TransformSmoothedOutlineToPolygon(), PCB_TEXT::TransformTextToPolySet(), and PCB_TEXTBOX::TransformTextToPolySet().
|
privateinherited |
Definition at line 1034 of file shape_poly_set.cpp.
References std::abs(), SHAPE_POLY_SET::importTree(), SHAPE_POLY_SET::m_polys, and SEG_CNT_MAX.
|
privateinherited |
Definition at line 1125 of file shape_poly_set.cpp.
References std::abs(), SHAPE_POLY_SET::importTree(), SHAPE_POLY_SET::m_polys, and SEG_CNT_MAX.
Referenced by SHAPE_POLY_SET::Inflate().
|
privateinherited |
Definition at line 1229 of file shape_poly_set.cpp.
References std::abs(), SHAPE_LINE_CHAIN::convertToClipper2(), SHAPE_POLY_SET::importTree(), path, and SEG_CNT_MAX.
Referenced by SHAPE_POLY_SET::OffsetLineChain().
|
inherited |
Perform outline inflation/deflation, using round corners.
Polygons can have holes and/or linked holes with main outlines. The resulting polygons are also polygons with linked holes to main outlines. For aFastMode meaning, see function booleanOp .
Definition at line 1025 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::Fracture(), SHAPE_POLY_SET::Inflate(), and SHAPE_POLY_SET::Unfracture().
Referenced by FEATURES_MANAGER::AddPadShape(), PCB_IO_IPC2581::addShape(), PCB_IO_KICAD_LEGACY::loadZONE_CONTAINER(), PlotStandardLayer(), and ZONE::TransformShapeToPolygon().
|
inherited |
Adds a vertex in the globally indexed position aGlobalIndex.
aGlobalIndex | is the global index of the position in which the new vertex will be inserted. |
aNewVertex | is the new inserted vertex. |
Definition at line 317 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::Append(), SHAPE_POLY_SET::GetRelativeIndices(), SHAPE_POLY_SET::VERTEX_INDEX::m_contour, SHAPE_POLY_SET::VERTEX_INDEX::m_polygon, SHAPE_POLY_SET::m_polys, SHAPE_POLY_SET::VERTEX_INDEX::m_vertex, and SHAPE_POLY_SET::TotalVertices().
Referenced by PCB_POINT_EDITOR::addCorner(), and PCB_POINT_EDITOR::chamferCorner().
|
inlineinherited |
Return true if the set is empty (no polygons at all)
Definition at line 1283 of file shape_poly_set.h.
References SHAPE_POLY_SET::m_polys.
Referenced by SCH_SHAPE::AddPoint(), STEP_PCB_MODEL::AddPolygonShapes(), BOARD_ADAPTER::addShape(), SHAPE_POLY_SET::Collide(), BOARD_ADAPTER::createPadWithMargin(), CONVERT_TOOL::CreatePolys(), TRACKS_CLEANER::deleteTracksInPads(), PAD::doCheckPad(), doConvertOutlineToPolygon(), DRC_ENGINE::EvalRules(), PCB_BASE_FRAME::FocusOnItems(), EDA_SHAPE::getBoundingBox(), ZONE::HatchBorder(), BOARD_INSPECTION_TOOL::InspectClearance(), EDA_SHAPE::IsClosed(), PCB_IO_EASYEDAPRO_PARSER::ParseBoard(), PCB_IO_KICAD_SEXPR_PARSER::parseZONE(), PlotStandardLayer(), BRDITEMS_PLOTTER::PlotZone(), PAD::Recombine(), EE_POINT_EDITOR::removeCornerCondition(), KIGFX::VIEW::SetCenter(), and DRC_INTERACTIVE_COURTYARD_CLEARANCE::testCourtyardClearances().
|
inlineinherited |
Return true if the shape is a null shape.
true | if null :-) |
Definition at line 166 of file shape.h.
References SHAPE_BASE::m_type, and SH_NULL.
|
inlineoverridevirtual |
Reimplemented from KIFONT::GLYPH.
|
inherited |
Check whether the aPolygonIndex-th polygon in the set is self intersecting.
aPolygonIndex | is the index of the polygon that wants to be checked. |
Definition at line 485 of file shape_poly_set.cpp.
References SEG::A, std::abs(), SEG::B, SHAPE_POLY_SET::CIterateSegmentsWithHoles(), SEG::Collide(), SHAPE_POLY_SET::FullPointCount(), SEG::Index(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by SHAPE_POLY_SET::IsSelfIntersecting().
|
inherited |
Check whether any of the polygons in the set is self intersecting.
Definition at line 535 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::IsPolygonSelfIntersecting(), and SHAPE_POLY_SET::m_polys.
Referenced by SHAPE_POLY_SET::cacheTriangulation().
|
inlineoverridevirtualinherited |
Implements SHAPE.
Definition at line 1158 of file shape_poly_set.h.
|
inlinevirtualinherited |
Reimplemented in KIFONT::STROKE_GLYPH.
Definition at line 51 of file glyph.h.
Referenced by CALLBACK_GAL::DrawGlyph(), KIGFX::OPENGL_GAL::DrawGlyph(), and KIGFX::CAIRO_GAL_BASE::DrawGlyph().
|
inherited |
Definition at line 3145 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::checksum(), SHAPE_POLY_SET::m_hash, SHAPE_POLY_SET::m_hashValid, and SHAPE_POLY_SET::m_triangulationValid.
Referenced by KIGFX::PCB_PAINTER::draw(), KIGFX::GERBVIEW_PAINTER::draw(), KIGFX::OPENGL_GAL::DrawPolygon(), SHAPE_POLY_SET::HasIndexableSubshapes(), SHAPE_POLY_SET::SHAPE_POLY_SET(), and PNS_KICAD_IFACE_BASE::syncZone().
|
inherited |
Check whether the aGlobalIndex-th vertex belongs to a hole.
aGlobalIdx | is the index of the vertex. |
Definition at line 2905 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::GetRelativeIndices(), and SHAPE_POLY_SET::VERTEX_INDEX::m_contour.
|
inlineinherited |
Definition at line 840 of file shape_poly_set.h.
References SHAPE_POLY_SET::Iterate(), and SHAPE_POLY_SET::OutlineCount().
Referenced by SHAPE_POLY_SET::Iterate(), and SHAPE_POLY_SET::IterateWithHoles().
|
inlineinherited |
Return an object to iterate through the points of the polygons between aFirst
and aLast
.
aFirst | is the first polygon whose points will be iterated. |
aLast | is the last polygon whose points will be iterated. |
aIterateHoles | is a flag to indicate whether the points of the holes should be iterated. |
Definition at line 802 of file shape_poly_set.h.
References SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::m_currentContour, SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::m_currentPolygon, SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::m_currentVertex, SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::m_iterateHoles, SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::m_lastPolygon, SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::m_poly, and SHAPE_POLY_SET::OutlineCount().
Referenced by PCB_POINT_EDITOR::addCorner(), PCB_POINT_EDITOR::chamferCorner(), and ZONE::Iterate().
|
inlineinherited |
aOutline | is the index of the polygon to be iterated. |
Definition at line 821 of file shape_poly_set.h.
References SHAPE_POLY_SET::Iterate().
|
inlineinherited |
Definition at line 889 of file shape_poly_set.h.
References SHAPE_POLY_SET::GetRelativeIndices(), SHAPE_POLY_SET::IterateWithHoles(), SHAPE_POLY_SET::VERTEX_INDEX::m_contour, SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::m_currentContour, SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::m_currentPolygon, SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::m_currentVertex, SHAPE_POLY_SET::VERTEX_INDEX::m_polygon, and SHAPE_POLY_SET::VERTEX_INDEX::m_vertex.
|
inlineinherited |
Return an iterator object, for all outlines in the set (no holes).
Definition at line 954 of file shape_poly_set.h.
References SHAPE_POLY_SET::IterateSegments(), and SHAPE_POLY_SET::OutlineCount().
Referenced by SHAPE_POLY_SET::IterateSegments(), and SHAPE_POLY_SET::IterateSegmentsWithHoles().
|
inlineinherited |
Return an iterator object, for iterating between aFirst and aLast outline, with or without holes (default: without)
Definition at line 910 of file shape_poly_set.h.
References SHAPE_POLY_SET::SEGMENT_ITERATOR_TEMPLATE< T >::m_currentContour, SHAPE_POLY_SET::SEGMENT_ITERATOR_TEMPLATE< T >::m_currentPolygon, SHAPE_POLY_SET::SEGMENT_ITERATOR_TEMPLATE< T >::m_currentSegment, SHAPE_POLY_SET::SEGMENT_ITERATOR_TEMPLATE< T >::m_iterateHoles, SHAPE_POLY_SET::SEGMENT_ITERATOR_TEMPLATE< T >::m_lastPolygon, SHAPE_POLY_SET::SEGMENT_ITERATOR_TEMPLATE< T >::m_poly, and SHAPE_POLY_SET::OutlineCount().
Referenced by TestConcaveSquareFillet(), TestSquareFillet(), and PCB_DIM_LEADER::updateGeometry().
|
inlineinherited |
Return an iterator object, for iterating aPolygonIdx-th polygon edges.
Definition at line 942 of file shape_poly_set.h.
References SHAPE_POLY_SET::IterateSegments().
|
inlineinherited |
Returns an iterator object, for all outlines in the set (with holes)
Definition at line 966 of file shape_poly_set.h.
References SHAPE_POLY_SET::IterateSegments(), and SHAPE_POLY_SET::OutlineCount().
Referenced by GENCAD_EXPORTER::CreateBoardSection(), doConvertOutlineToPolygon(), ZONE::HatchBorder(), BOARD::TestZoneIntersection(), and DRC_TEST_PROVIDER_COPPER_CLEARANCE::testZonesToZones().
|
inlineinherited |
Return an iterator object, for the aOutline-th outline in the set (with holes).
Definition at line 972 of file shape_poly_set.h.
References SHAPE_POLY_SET::IterateSegments().
|
inlineinherited |
Definition at line 849 of file shape_poly_set.h.
References SHAPE_POLY_SET::Iterate(), and SHAPE_POLY_SET::OutlineCount().
Referenced by SHAPE_POLY_SET::IterateFromVertexWithHoles(), and SHAPE_POLY_SET::RemoveNullSegments().
|
inlineinherited |
aOutline | the index of the polygon to be iterated. |
Definition at line 831 of file shape_poly_set.h.
References SHAPE_POLY_SET::Iterate().
Referenced by findVertex(), ZONE::HatchBorder(), ZONE::IterateWithHoles(), and BOARD::TestZoneIntersection().
|
inherited |
Mirror the line points about y or x (or both)
aRef | sets the reference point about which to mirror |
aFlipDirection | is the direction to mirror the points. |
Definition at line 2724 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::CacheTriangulation(), SHAPE_POLY_SET::m_polys, SHAPE_POLY_SET::m_triangulationValid, and path.
Referenced by GERBER_DRAW_ITEM::ConvertSegmentToPolygon(), EDA_SHAPE::flip(), FOOTPRINT::Flip(), FABMASTER::loadFootprints(), PCB_SHAPE::Mirror(), and ZONE::Mirror().
|
overridevirtualinherited |
Implements SHAPE.
Definition at line 2708 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::checksum(), SHAPE_POLY_SET::m_hash, SHAPE_POLY_SET::m_hashValid, SHAPE_POLY_SET::m_polys, SHAPE_POLY_SET::m_triangulatedPolys, and path.
Referenced by ZONE_FILLER::addHatchFillTypeOnZone(), FEATURES_MANAGER::AddPadShape(), TEARDROP_MANAGER::computeAnchorPoints(), GERBER_DRAW_ITEM::ConvertSegmentToPolygon(), ALTIUM_PCB::ConvertShapeBasedRegions6ToFootprintItemOnLayer(), GERBER_DRAW_ITEM::HitTest(), FABMASTER::loadFootprints(), CADSTAR_PCB_ARCHIVE_LOADER::loadLibraryCoppers(), EDA_SHAPE::move(), ZONE::Move(), FOOTPRINT::MoveAnchorPosition(), GERBER_DRAW_ITEM::MoveXY(), playground_main_func(), DS_DRAW_ITEM_POLYPOLYGONS::SetPosition(), FOOTPRINT::SetPosition(), TransformOvalToPolygon(), TransformRoundChamferedRectToPolygon(), PAD::TransformShapeToPolygon(), and TransformTrapezoidToPolygon().
|
inherited |
Definition at line 695 of file wrlfacet.cpp.
References SHAPE::facets.
Referenced by WRL2FACESET::TranslateToSG(), X3DIFACESET::TranslateToSG(), and WRL1FACESET::TranslateToSG().
|
inherited |
Creates a new hole in a given outline.
Definition at line 254 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::m_polys, and SHAPE_LINE_CHAIN::SetClosed().
Referenced by SHAPE_POLY_SET::BuildPolysetFromOrientedPaths(), ZONE::NewHole(), and TransformRingToPolygon().
|
inherited |
Creates a new empty polygon in the set and returns its index.
Definition at line 242 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::m_polys, and SHAPE_LINE_CHAIN::SetClosed().
Referenced by AR_AUTOPLACER::addFpBody(), addHoleToPolygon(), ZONE_FILLER::addKnockout(), AR_AUTOPLACER::addPad(), SCH_SHAPE::AddPoint(), PCB_IO_IPC2581::addShape(), ZONE::AppendCorner(), EDA_SHAPE::beginEdit(), BOARD::BOARD(), BOOST_AUTO_TEST_CASE(), BuildBoardPolygonOutlines(), PCB_TEXT::buildBoundingHull(), BuildFootprintPolygonOutlines(), SHAPE_POLY_SET::BuildPolysetFromOrientedPaths(), KI_TEST::CommonTestData::CommonTestData(), TEARDROP_MANAGER::computeAnchorPoints(), AM_PRIMITIVE::ConvertBasicShapeToPolygon(), ALTIUM_PCB::ConvertFills6ToFootprintItemOnLayer(), GERBER_DRAW_ITEM::ConvertSegmentToPolygon(), D_CODE::ConvertShapeToPolygon(), CornerListToPolygon(), BITMAPCONV_INFO::createOutputData(), BOARD_ADAPTER::createPadWithMargin(), TEARDROP_MANAGER::createTeardrop(), KIGFX::PCB_PAINTER::draw(), KIGFX::GERBVIEW_PAINTER::drawPolygon(), GERBER_FILE_IMAGE::Execute_DCODE_Command(), fillArcPOLY(), PCB_BASE_FRAME::FocusOnItems(), FOOTPRINT::GetBoundingHull(), getRectangleAlongCentreLine(), EDA_SHAPE::hitTest(), TEST_EE_ITEM_FIXTURE::Instantiate(), KIGFX::knockoutText(), FABMASTER::loadFootprints(), PCB_IO_EAGLE::loadPolygon(), FABMASTER::loadShapePolySet(), FABMASTER::loadZone(), PCB_IO_KICAD_LEGACY::loadZONE_CONTAINER(), RULE_AREA_CREATE_HELPER::OnComplete(), PCB_IO_KICAD_SEXPR_PARSER::parseTextBoxContent(), PCB_IO_KICAD_SEXPR_PARSER::parseZONE(), DXF_PLOTTER::PlotPoly(), BRDITEMS_PLOTTER::PlotShape(), PlotStandardLayer(), POLYGON_BOOLEAN_ROUTINE::ProcessShape(), RENDER_3D_OPENGL::reload(), EDA_SHAPE::rotate(), KIGFX::PREVIEW::POLYGON_ITEM::SetPoints(), EDA_SHAPE::SetPolyPoints(), SHAPE_POLY_SET::SHAPE_POLY_SET(), DS_DATA_ITEM_POLYGONS::SyncDrawItems(), TransformArcToPolygon(), TransformCircleToPolygon(), TransformOvalToPolygon(), EDA_SHAPE::TransformShapeToPolygon(), PCB_TEXTBOX::TransformShapeToPolygon(), PCB_TEXT::TransformTextToPolySet(), PCB_TEXTBOX::TransformTextToPolySet(), ROUNDRECT::TransformToPolygon(), SHAPE_RECT::TransformToPolygon(), PCB_DIM_ALIGNED::updateGeometry(), PCB_DIM_ORTHOGONAL::updateGeometry(), PCB_DIM_RADIAL::updateGeometry(), and PCB_DIM_LEADER::updateGeometry().
|
inherited |
Convert a self-intersecting polygon to one (or more) non self-intersecting polygon(s).
Removes null segments.
Definition at line 2109 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::AddOutline(), SHAPE_POLY_SET::BooleanSubtract(), SHAPE_POLY_SET::OutlineCount(), SHAPE_POLY_SET::PM_FAST, SHAPE_POLY_SET::PM_STRICTLY_SIMPLE, SHAPE_POLY_SET::Polygon(), SHAPE_POLY_SET::RemoveNullSegments(), and SHAPE_POLY_SET::Simplify().
Referenced by BITMAPCONV_INFO::createOutputData().
|
inherited |
Perform offsetting of a line chain.
Replaces this polygon set with the result.
aLine | is the line to perform offsetting on. |
aAmount | is the number of units to offset the line chain. |
aCornerStrategy | ALLOW_ACUTE_CORNERS to preserve all angles, CHAMFER_ACUTE_CORNERS to chop angles less than 90°, ROUND_ACUTE_CORNERS to round off angles less than 90°, ROUND_ALL_CORNERS to round regardless of angles |
aMaxError | is the allowable deviation when rounding corners with an approximated polygon |
aSimplify | set to simplify the output polygon. |
Definition at line 1335 of file shape_poly_set.cpp.
References std::abs(), FULL_CIRCLE, GetArcToSegmentCount(), and SHAPE_POLY_SET::inflateLine2().
Referenced by PCB_TUNING_PATTERN::getOutline(), and SHAPE_LINE_CHAIN::OffsetLine().
|
inlineinherited |
Return the reference to aIndex-th outline in the set.
Definition at line 727 of file shape_poly_set.h.
References SHAPE_POLY_SET::m_polys.
Referenced by EE_POINT_EDITOR::addCorner(), ZONE_FILLER::addHatchFillTypeOnZone(), PCB_IO_IPC2581::addOutlineNode(), PCB_IO_IPC2581::addPackage(), SCH_SHAPE::AddPoint(), SHAPE_POLY_SET::Area(), EDA_SHAPE::beginEdit(), BOOST_AUTO_TEST_CASE(), BuildBoardPolygonOutlines(), FOOTPRINT::BuildCourtyardCaches(), BuildFootprintPolygonOutlines(), SHAPE_POLY_SET::BuildPolysetFromOrientedPaths(), ZONE::BuildSmoothedPoly(), ZONE_FILLER::buildThermalSpokes(), SHAPE_POLY_SET::cacheTriangulation(), EDA_SHAPE::calcEdit(), FOOTPRINT::CheckNetTies(), KI_TEST::CheckShapePolySet(), collide(), collidesWithArea(), TEARDROP_MANAGER::computeAnchorPoints(), ZONE_FILLER::connect_nearby_polys(), EDA_SHAPE::continueEdit(), ALTIUM_PCB::ConvertFills6ToFootprintItemOnLayer(), ConvertPolygonToBlocks(), FOOTPRINT::CoverageRatio(), BITMAPCONV_INFO::createOutputData(), PLACEFILE_GERBER_WRITER::CreatePlaceFile(), doConvertOutlineToPolygon(), KIGFX::DS_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), CALLBACK_GAL::DrawGlyph(), DRAWING_TOOL::DrawVia(), EDA_SHAPE::endEdit(), GBR_TO_PCB_EXPORTER::export_flashed_copper_item(), GBR_TO_PCB_EXPORTER::export_non_copper_item(), DSN::SPECCTRA_DB::fillBOUNDARY(), AR_AUTOPLACER::fillMatrix(), POLYGON_BOOLEAN_ROUTINE::Finalize(), TEARDROP_MANAGER::findAnchorPointsOnTrack(), CADSTAR_SCH_ARCHIVE_LOADER::fixUpLibraryPins(), GERBER_PLOTTER::FlashPadChamferRoundRect(), DXF_PLOTTER::FlashPadCustom(), HPGL_PLOTTER::FlashPadCustom(), PSLIKE_PLOTTER::FlashPadCustom(), GERBER_PLOTTER::FlashPadCustom(), DXF_PLOTTER::FlashPadRoundRect(), GERBER_PLOTTER::FlashPadRoundRect(), HPGL_PLOTTER::FlashPadRoundRect(), PSLIKE_PLOTTER::FlashPadRoundRect(), PCB_IO_KICAD_SEXPR::format(), formatPoly(), APERTURE_MACRO::GetApertureMacroShape(), BOARD::GetBoardPolygonOutlines(), PCB_SHAPE::GetCorners(), DIALOG_BOARD_STATISTICS::getDataFromPCB(), PCB_SHAPE::GetFocusPosition(), SCH_SHAPE::GetItemDescription(), PCB_TUNING_PATTERN::getOutline(), CADSTAR_PCB_ARCHIVE_LOADER::getPolySetFromCadstarShape(), CADSTAR_SCH_ARCHIVE_LOADER::getScaledLibPart(), EDA_SHAPE::hitTest(), PNS::HOLE::Hull(), PNS::SOLID::Hull(), TEST_EE_ITEM_FIXTURE::Instantiate(), EDA_SHAPE::IsClosed(), GEOM_TEST::IsPolySetValid(), EDA_SHAPE::IsPolyShapeValid(), FABMASTER::loadFootprints(), FABMASTER::loadZone(), DSN::SPECCTRA_DB::makeIMAGE(), DSN::SPECCTRA_DB::makePADSTACK(), PCB_SHAPE::Normalize(), RULE_AREA_CREATE_HELPER::OnComplete(), ALTIUM_PCB::ParsePolygons6Data(), SCH_IO_KICAD_SEXPR_PARSER::ParseSchematic(), SCH_IO_KICAD_SEXPR_PARSER::parseSchRuleArea(), PCB_IO_KICAD_SEXPR_PARSER::parseTextBoxContent(), PCB_IO_KICAD_SEXPR_PARSER::parseZONE(), ZONE_CREATE_HELPER::performZoneCutout(), playground_main_func(), SCH_RULE_AREA::Plot(), SCH_SHAPE::Plot(), PlotDrawingSheet(), BRDITEMS_PLOTTER::PlotShape(), BRDITEMS_PLOTTER::PlotText(), BRDITEMS_PLOTTER::PlotZone(), polygonArea(), SCH_SHAPE::Print(), SCH_SHAPE::PrintBackground(), GERBER_DRAW_ITEM::PrintGerberPoly(), DS_DRAW_ITEM_POLYPOLYGONS::PrintWsItem(), DRC_RTREE::QueryColliding(), RENDER_3D_OPENGL::reload(), EE_POINT_EDITOR::removeCorner(), EE_POINT_EDITOR::removeCornerCondition(), DRC_TEST_PROVIDER_ANNULAR_WIDTH::Run(), DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run(), DRC_TEST_PROVIDER_SLIVER_CHECKER::Run(), SCH_IO_KICAD_LEGACY_LIB_CACHE::savePolyLine(), EDA_SHAPE::scale(), SHAPE_POLY_SET::SHAPE_POLY_SET(), ZONE_FILLER::subtractHigherPriorityZones(), PNS_KICAD_IFACE_BASE::syncTextItem(), DRC_INTERACTIVE_COURTYARD_CLEARANCE::testCourtyardClearances(), DRC_TEST_PROVIDER_ZONE_CONNECTIONS::testZoneLayer(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testZoneLayer(), DIALOG_GLOBAL_EDIT_TEARDROPS::TransferDataFromWindow(), TransformArcToPolygon(), EDA_SHAPE::TransformShapeToPolygon(), PCB_TEXTBOX::TransformShapeToPolygon(), ROUNDRECT::TransformToPolygon(), SHAPE_RECT::TransformToPolygon(), VERTEX_CONNECTOR::VERTEX_CONNECTOR(), and GBR_TO_PCB_EXPORTER::writePcbZoneItem().
|
inlineinherited |
Definition at line 732 of file shape_poly_set.h.
References SHAPE_POLY_SET::m_polys.
|
inlineinherited |
Return the number of outlines in the set.
Definition at line 705 of file shape_poly_set.h.
References SHAPE_POLY_SET::m_polys.
Referenced by FEATURES_MANAGER::AddContour(), PCB_IO_IPC2581::addContourNode(), PCB_POINT_EDITOR::addCorner(), ZONE_FILLER::addHatchFillTypeOnZone(), PCB_IO_IPC2581::addKnockoutText(), PCB_IO_IPC2581::addOutlineNode(), EDA_DATA::AddPackage(), PCB_IO_IPC2581::addPackage(), PAD::addPadPrimitivesToPolygon(), FEATURES_MANAGER::AddPadShape(), ZONE::AddPolygon(), PAD::AddPrimitivePoly(), FEATURES_MANAGER::AddShape(), PCB_IO_IPC2581::addShape(), TRIANGLE_DISPLAY_LIST::AddToMiddleContourns(), PNS_LOG_VIEWER_OVERLAY::AnnotatedPolyset(), ZONE::AppendCorner(), SHAPE_POLY_SET::Area(), SHAPE_POLY_SET::booleanOp(), BOOST_AUTO_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), SHAPE_POLY_SET::BuildBBoxCaches(), BuildBoardPolygonOutlines(), BuildConvexHull(), FOOTPRINT::BuildCourtyardCaches(), BuildFootprintPolygonOutlines(), ZONE::BuildSmoothedPoly(), ZONE_FILLER::buildThermalSpokes(), SHAPE_POLY_SET::cacheTriangulation(), PCB_POINT_EDITOR::chamferCorner(), FOOTPRINT::CheckNetTies(), KI_TEST::CheckShapePolySet(), SHAPE_POLY_SET::CIterate(), SHAPE_POLY_SET::CIterateSegments(), SHAPE_POLY_SET::CIterateSegmentsWithHoles(), SHAPE_POLY_SET::CIterateWithHoles(), collide(), collidesWithArea(), ZONE_FILLER::connect_nearby_polys(), SHAPE_POLY_SET::Contains(), convertPolygon(), ConvertPolygonToBlocks(), RENDER_3D_OPENGL::createBoard(), BITMAPCONV_INFO::createOutputData(), GENCAD_EXPORTER::CreatePadsShapesSection(), STEP_PCB_MODEL::CreatePCB(), PLACEFILE_GERBER_WRITER::CreatePlaceFile(), CONVERT_TOOL::CreatePolys(), PAD::doCheckPad(), doConvertOutlineToPolygon(), KIGFX::DS_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), KIGFX::GERBVIEW_PAINTER::draw(), KIGFX::GERBVIEW_PAINTER::drawApertureMacro(), D_CODE::DrawFlashedPolygon(), D_CODE::DrawFlashedShape(), KIGFX::GERBVIEW_PAINTER::drawFlashedShape(), CALLBACK_GAL::DrawGlyph(), AR_AUTOPLACER::drawPlacementRoutingMatrix(), KIGFX::CAIRO_GAL_BASE::DrawPolygon(), KIGFX::OPENGL_GAL::DrawPolygon(), KIGFX::GERBVIEW_PAINTER::drawPolygon(), KIGFX::PREVIEW::POLYGON_ITEM::drawPreviewShape(), KIGFX::OPENGL_GAL::drawTriangulatedPolyset(), DRAWING_TOOL::DrawVia(), EDA_SHAPE::DupPolyPointsList(), GERBER_FILE_IMAGE::Execute_DCODE_Command(), GBR_TO_PCB_EXPORTER::export_copper_item(), EXPORTER_PCB_VRML::ExportVrmlBoard(), EXPORTER_PCB_VRML::ExportVrmlPolygonSet(), fillArcPOLY(), DSN::SPECCTRA_DB::fillBOUNDARY(), ZONE_FILLER::fillCopperZone(), GEOM_TEST::FilletPolySet(), POLYGON_BOOLEAN_ROUTINE::Finalize(), DXF_PLOTTER::FlashPadCustom(), HPGL_PLOTTER::FlashPadCustom(), PSLIKE_PLOTTER::FlashPadCustom(), GERBER_PLOTTER::FlashPadCustom(), formatPoly(), SHAPE_POLY_SET::FullPointCount(), RENDER_3D_OPENGL::generateHoles(), RENDER_3D_OPENGL::generateLayerList(), PCB_IO_IPC2581::generateLayerSetNet(), RENDER_3D_OPENGL::generateViasAndPads(), APERTURE_MACRO::GetApertureMacroShape(), BOARD::GetBoardPolygonOutlines(), GERBER_DRAW_ITEM::GetBoundingBox(), FOOTPRINT::GetBoundingHull(), SHAPE::GetClearance(), PCB_SHAPE::GetCorners(), DIALOG_BOARD_STATISTICS::getDataFromPCB(), FOOTPRINT::GetEffectiveShape(), PCB_TUNING_PATTERN::getOutline(), EDA_SHAPE::GetPointCount(), CADSTAR_PCB_ARCHIVE_LOADER::getPolySetFromCadstarShape(), SHAPE_POLY_SET::GetRelativeIndices(), D_CODE::GetShapeDim(), SHAPE_POLY_SET::HasTouchingHoles(), EDA_SHAPE::hitTest(), DS_DRAW_ITEM_POLYPOLYGONS::HitTest(), ZONE::HitTestCutout(), FEATURES_MANAGER::InitFeatureList(), isCopperOutside(), GEOM_TEST::IsPolySetValid(), EDA_SHAPE::IsPolyShapeValid(), SHAPE_POLY_SET::Iterate(), SHAPE_POLY_SET::IterateSegments(), SHAPE_POLY_SET::IterateSegmentsWithHoles(), SHAPE_POLY_SET::IterateWithHoles(), FABMASTER::loadFootprints(), FABMASTER::loadGraphics(), FABMASTER::loadPolygon(), PCB_IO_EAGLE::loadPolygon(), EDA_SHAPE::makeEffectiveShapes(), SCH_RULE_AREA::MakeEffectiveShapes(), PCB_SHAPE::Normalize(), SHAPE_POLY_SET::NormalizeAreaOutlines(), SHAPE_LINE_CHAIN::OffsetLine(), SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::operator bool(), kiapi::common::PackPolySet(), PCB_IO_EASYEDAPRO_PARSER::ParseBoard(), PCB_IO_EASYEDAPRO_PARSER::ParseFootprint(), ALTIUM_PCB::ParsePolygons6Data(), PCB_IO_KICAD_SEXPR_PARSER::parseRenderCache(), PCB_IO_EASYEDA_PARSER::ParseToBoardItemContainer(), ZONE_CREATE_HELPER::performZoneCutout(), playground_main_func(), PlotDrawingSheet(), PlotLayerOutlines(), DXF_PLOTTER::PlotPoly(), BRDITEMS_PLOTTER::PlotShape(), PlotStandardLayer(), BRDITEMS_PLOTTER::PlotText(), BRDITEMS_PLOTTER::PlotZone(), SHAPE::PointInside(), SHAPE_POLY_SET::PointInside(), polygonArea(), GERBER_DRAW_ITEM::Print(), DS_DRAW_ITEM_POLYPOLYGONS::PrintWsItem(), POLYGON_SUBTRACT_ROUTINE::ProcessSubsequentPolygon(), POLYGON_INTERSECT_ROUTINE::ProcessSubsequentPolygon(), DRC_RTREE::QueryColliding(), RENDER_3D_RAYTRACE_BASE::Reload(), ZONE::RemoveCutout(), DRC_TEST_PROVIDER_ANNULAR_WIDTH::Run(), DRC_TEST_PROVIDER_SLIVER_CHECKER::Run(), DRC_TEST_PROVIDER_TEXT_DIMS::Run(), EDA_SHAPE::scale(), EDA_SHAPE::SetPolyShape(), SHAPE::SquaredDistance(), SHAPE_POLY_SET::Subset(), PNS_KICAD_IFACE_BASE::syncTextItem(), TestConcaveSquareFillet(), DRC_INTERACTIVE_COURTYARD_CLEARANCE::testCourtyardClearances(), DRC_TEST_PROVIDER_COURTYARD_CLEARANCE::testCourtyardClearances(), TestSquareFillet(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testZoneLayer(), EDA_SHAPE::TransformShapeToPolygon(), VERTEX_CONNECTOR::VERTEX_CONNECTOR(), HYPERLYNX_EXPORTER::writeBoardInfo(), HYPERLYNX_EXPORTER::writeNetObjects(), GBR_TO_PCB_EXPORTER::writePcbPolygon(), and GBR_TO_PCB_EXPORTER::writePcbZoneItem().
|
overridevirtualinherited |
Reimplemented from SHAPE.
Definition at line 2175 of file shape_poly_set.cpp.
References SHAPE_LINE_CHAIN::Append(), SHAPE_POLY_SET::m_polys, SHAPE_LINE_CHAIN::SetClosed(), VECTOR2< T >::x, and VECTOR2< T >::y.
|
overridevirtualinherited |
Check if point aP lies inside a closed shape.
Always returns false if this shape is not closed.
aPt | point to check |
aUseBBoxCache | gives better performance if the bounding box caches have been generated. |
Reimplemented from SHAPE.
Definition at line 3553 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::COutline(), SHAPE_POLY_SET::OutlineCount(), and SHAPE_LINE_CHAIN_BASE::PointInside().
Referenced by SHAPE_POLY_SET::containsSingle().
|
inherited |
Check if point aP lies on an edge or vertex of some of the outlines or holes.
aP | is the point to check. |
Definition at line 2267 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::m_polys.
Referenced by PATH_CONNECTION::isValid().
|
inlineinherited |
Return the aIndex-th subpolygon in the set.
Definition at line 760 of file shape_poly_set.h.
References SHAPE_POLY_SET::m_polys.
Referenced by FEATURES_MANAGER::AddContour(), PCB_IO_IPC2581::addContourNode(), PCB_IO_IPC2581::addOutlineNode(), EDA_DATA::AddPackage(), SHAPE_POLY_SET::cacheTriangulation(), SHAPE_POLY_SET::chamferFilletPolygon(), KIGFX::OPENGL_GAL::drawTriangulatedPolyset(), ZONE_FILLER::fillCopperZone(), PCB_IO_KICAD_SEXPR::format(), PCB_IO_IPC2581::generateProfile(), SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::Get(), SHAPE_POLY_SET::SEGMENT_ITERATOR_TEMPLATE< T >::Get(), SHAPE_POLY_SET::GetGlobalIndex(), FABMASTER::loadFootprints(), STEP_PCB_MODEL::MakeShapes(), SHAPE_POLY_SET::NormalizeAreaOutlines(), kiapi::common::PackPolySet(), PCB_POINT_EDITOR::removeCorner(), PCB_POINT_EDITOR::removeCornerCondition(), and SHAPE_POLY_SET::Subset().
|
inlineinherited |
Definition at line 765 of file shape_poly_set.h.
References SHAPE_POLY_SET::m_polys.
|
inherited |
Extract all contours from this polygon set, then recreate polygons with holes.
Essentially XOR'ing, but faster. Self-intersecting polygons are not supported.
Definition at line 641 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::AddHole(), SHAPE_POLY_SET::AddOutline(), SHAPE_LINE_CHAIN::CPoint(), SHAPE_POLY_SET::m_polys, path, SHAPE_LINE_CHAIN_BASE::PointInside(), and process.
Referenced by PCB_IO_EASYEDAPRO_PARSER::ParseBoard(), PCB_IO_EASYEDAPRO_PARSER::ParseFootprint(), and PCB_IO_EASYEDA_PARSER::ParseToBoardItemContainer().
|
inherited |
Remove all outlines & holes (clears) the polygon set.
Definition at line 2412 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::m_polys.
Referenced by buildBoardBoundingBoxPoly(), BuildBoardPolygonOutlines(), FOOTPRINT::BuildCourtyardCaches(), AR_AUTOPLACER::buildFpAreas(), DRC_TEST_PROVIDER_SOLDER_MASK::buildRTrees(), D_CODE::Clear_D_CODE_Data(), GERBER_DRAW_ITEM::ConvertSegmentToPolygon(), D_CODE::ConvertShapeToPolygon(), BOARD_ADAPTER::createBoardPolygon(), BITMAPCONV_INFO::createOutputData(), BOARD_ADAPTER::destroyLayers(), EXPORTER_PCB_VRML::ExportStandardLayers(), EXPORTER_PCB_VRML::ExportVrmlSolderMask(), ZONE_FILLER::Fill(), RENDER_3D_OPENGL::generateViasAndPads(), APERTURE_MACRO::GetApertureMacroShape(), FOOTPRINT::GetBoundingHull(), PAD::MergePrimitivesAsPolygon(), PCB_IO_KICAD_SEXPR_PARSER::parseTextBoxContent(), PlotLayerOutlines(), RENDER_3D_OPENGL::reload(), ZONE::RemoveAllContours(), EDA_SHAPE::rotate(), KIGFX::PREVIEW::POLYGON_ITEM::SetPoints(), and EDA_SHAPE::SetPolyPoints().
|
inherited |
Delete the aContourIdx-th contour of the aPolygonIdx-th polygon in the set.
aContourIdx | is the index of the contour in the aPolygonIdx-th polygon to be removed. |
aPolygonIdx | is the index of the polygon in which the to-be-removed contour is. Defaults to the last polygon in the set. |
Definition at line 2418 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::m_polys.
Referenced by PCB_POINT_EDITOR::removeCorner().
|
inherited |
Look for null segments; ie, segments whose ends are exactly the same and deletes them.
Definition at line 2434 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::GetIndex(), SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::IsEndContour(), SHAPE_POLY_SET::IterateWithHoles(), and SHAPE_POLY_SET::RemoveVertex().
Referenced by BOOST_AUTO_TEST_CASE(), SHAPE_POLY_SET::chamferFilletPolygon(), and SHAPE_POLY_SET::NormalizeAreaOutlines().
|
inherited |
Delete the aOutlineIdx-th outline of the set including its contours and holes.
aOutlineIdx | is the index of the outline to be removed. |
Definition at line 2428 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::m_polys.
|
inherited |
Delete the aGlobalIndex-th vertex.
aGlobalIndex | is the global index of the to-be-removed vertex. |
Definition at line 2649 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::GetRelativeIndices(), and SHAPE_POLY_SET::RemoveVertex().
Referenced by PCB_POINT_EDITOR::chamferCorner(), PCB_POINT_EDITOR::removeCorner(), SHAPE_POLY_SET::RemoveNullSegments(), and SHAPE_POLY_SET::RemoveVertex().
|
inherited |
Delete the vertex indexed by aRelativeIndex (index of polygon, contour and vertex).
aRelativeIndices | is the set of relative indices of the to-be-removed vertex. |
Definition at line 2661 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::VERTEX_INDEX::m_contour, SHAPE_POLY_SET::VERTEX_INDEX::m_polygon, SHAPE_POLY_SET::m_polys, and SHAPE_POLY_SET::VERTEX_INDEX::m_vertex.
|
overridevirtualinherited |
Rotate all vertices by a given angle.
aCenter | is the rotation center. |
aAngle | is the rotation angle. |
Implements SHAPE.
Definition at line 2737 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::CacheTriangulation(), SHAPE_POLY_SET::m_polys, SHAPE_POLY_SET::m_triangulationValid, and path.
Referenced by ZONE_FILLER::addHatchFillTypeOnZone(), FEATURES_MANAGER::AddPadShape(), PCB_TEXT::buildBoundingHull(), TEARDROP_MANAGER::computeAnchorPoints(), ALTIUM_PCB::ConvertFills6ToFootprintItemOnLayer(), D_CODE::ConvertShapeToPolygon(), FABMASTER::loadFootprints(), BRDITEMS_PLOTTER::PlotText(), OUTSET_ROUTINE::ProcessItem(), ZONE::Rotate(), EDA_SHAPE::rotate(), FOOTPRINT::SetOrientation(), TransformOvalToPolygon(), TransformRoundChamferedRectToPolygon(), PAD::TransformShapeToPolygon(), TransformTrapezoidToPolygon(), PCB_DIM_ALIGNED::updateGeometry(), PCB_DIM_ORTHOGONAL::updateGeometry(), PCB_DIM_RADIAL::updateGeometry(), and PCB_DIM_LEADER::updateGeometry().
|
inherited |
Accessor function to set the position of a specific point.
aIndex | #VERTEX_INDEX of the point to move. |
aPos | destination position of the specified point. |
Definition at line 2678 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::VERTEX_INDEX::m_contour, SHAPE_POLY_SET::VERTEX_INDEX::m_polygon, SHAPE_POLY_SET::m_polys, and SHAPE_POLY_SET::VERTEX_INDEX::m_vertex.
Referenced by ZONE::MoveEdge(), ZONE::SetCornerPosition(), SHAPE_POLY_SET::SetVertex(), and POLYGON_POINT_EDIT_BEHAVIOR::UpdateOutlineFromPoints().
|
inherited |
Set the vertex based on the global index.
Throws if the index doesn't exist.
aGlobalIndex | global index of the to-be-moved vertex |
aPos | New position on the vertex |
Definition at line 2667 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::GetRelativeIndices(), and SHAPE_POLY_SET::SetVertex().
|
inherited |
Simplify the polyset (merges overlapping polys, eliminates degeneracy/self-intersections) For aFastMode meaning, see function booleanOp.
Definition at line 2089 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::booleanOp(), and empty().
Referenced by PAD::addPadPrimitivesToPolygon(), FEATURES_MANAGER::AddShape(), BOARD_ADAPTER::addShape(), BOOST_AUTO_TEST_CASE(), EXPORTER_STEP::buildBoard3DShapes(), ZONE_FILLER::buildCopperItemClearances(), DRC_TEST_PROVIDER_SOLDER_MASK::buildRTrees(), SHAPE_POLY_SET::cacheTriangulation(), FOOTPRINT::CheckNetTies(), BOARD_ADAPTER::createBoardPolygon(), BITMAPCONV_INFO::createOutputData(), CONVERT_TOOL::CreatePolys(), SHAPE_POLY_SET::Fracture(), APERTURE_MACRO::GetApertureMacroShape(), BOARD::GetBoardPolygonOutlines(), PNS::HOLE::Hull(), PNS::SOLID::Hull(), DSN::SPECCTRA_DB::makeIMAGE(), STEP_PCB_MODEL::MakeShapes(), SHAPE_POLY_SET::NormalizeAreaOutlines(), PCB_IO_EASYEDAPRO_PARSER::ParseBoard(), PCB_IO_EASYEDAPRO_PARSER::ParseFootprint(), PlotLayerOutlines(), PlotSolderMaskLayer(), DRC_TEST_PROVIDER_SLIVER_CHECKER::Run(), DRC_TEST_PROVIDER_TEXT_DIMS::Run(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testZoneLayer(), PCB_TEXT::TransformTextToPolySet(), PCB_TEXTBOX::TransformTextToPolySet(), SHAPE_POLY_SET::Unfracture(), HYPERLYNX_EXPORTER::writeNetObjects(), and GBR_TO_PCB_EXPORTER::writePcbZoneItem().
|
inherited |
Simplifies the lines in the polyset.
This checks intermediate points to see if they are collinear with their neighbors, and removes them if they are.
aMaxError | is the maximum error to allow when simplifying the lines. |
Definition at line 2097 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::m_polys, and path.
Referenced by EXPORTER_STEP::buildBoard3DShapes(), EXPORTER_STEP::buildZones3DShape(), and SHAPE_POLY_SET::cacheTriangulation().
|
inherited |
Compute the minimum distance squared between aPoint and all the polygons in the set.
Squared distances are used because they avoid the cost of doing square-roots.
aPoint | is the point whose distance to the set has to be measured. |
aNearest | [out] an optional pointer to be filled in with the point on the polyset which is closest to aPoint. |
Definition at line 2851 of file shape_poly_set.cpp.
References VECTOR2< int32_t >::ECOORD_MAX, SHAPE_POLY_SET::m_polys, and SHAPE_POLY_SET::SquaredDistanceToPolygon().
Referenced by SHAPE_POLY_SET::Collide(), and SHAPE_POLY_SET::SquaredDistance().
|
inlineoverridevirtualinherited |
Reimplemented from SHAPE.
Definition at line 1437 of file shape_poly_set.h.
References SHAPE_POLY_SET::SquaredDistance().
|
inherited |
Compute the minimum distance between the aIndex-th polygon and aSegment with a possible width.
aSegment | is the segment whose distance to the aIndex-th polygon has to be measured. |
aIndex | is the index of the polygon whose distance to aPoint has to be measured. |
aNearest | [out] an optional pointer to be filled in with the point on the polyset which is closest to aSegment. |
Definition at line 2814 of file shape_poly_set.cpp.
References SEG::A, SEG::B, SHAPE_POLY_SET::CIterateSegmentsWithHoles(), SHAPE_POLY_SET::containsSingle(), and VECTOR2< T >::SquaredDistance().
|
inherited |
Compute the minimum distance between the aIndex-th polygon and aPoint.
aPoint | is the point whose distance to the aIndex-th polygon has to be measured. |
aIndex | is the index of the polygon whose distance to aPoint has to be measured. |
aNearest | [out] an optional pointer to be filled in with the point on the polyset which is closest to aPoint. |
Definition at line 2778 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::CIterateSegmentsWithHoles(), and SHAPE_POLY_SET::containsSingle().
Referenced by SHAPE_POLY_SET::SquaredDistance(), and SHAPE_POLY_SET::SquaredDistanceToSeg().
|
inherited |
Compute the minimum distance squared between aSegment and all the polygons in the set.
Squared distances are used because they avoid the cost of doing square-roots.
aSegment | is the segment whose distance to the polygon set has to be measured. |
aSegmentWidth | is the width of the segment; defaults to zero. |
aNearest | [out] an optional pointer to be filled in with the point on the polyset which is closest to aSegment. |
Definition at line 2880 of file shape_poly_set.cpp.
References VECTOR2< int32_t >::ECOORD_MAX, SHAPE_POLY_SET::m_polys, and SHAPE_POLY_SET::SquaredDistanceToPolygon().
Referenced by BOOST_AUTO_TEST_CASE(), SHAPE_POLY_SET::Collide(), and DRC_TEST_PROVIDER_ANNULAR_WIDTH::Run().
|
inherited |
Return a subset of the polygons in this set, the ones between aFirstPolygon and aLastPolygon.
aFirstPolygon | is the first polygon to be included in the returned set. |
aLastPolygon | is the last polygon to be excluded of the returned set. |
Definition at line 385 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::m_polys, SHAPE_POLY_SET::OutlineCount(), and SHAPE_POLY_SET::Polygon().
Referenced by SHAPE_POLY_SET::UnitSet().
|
inherited |
Return total number of vertices stored in the set.
Definition at line 2751 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::m_polys, and path.
Referenced by POLYGON_POINT_EDIT_BEHAVIOR::BuildForPolyOutline(), KI_TEST::CheckShapePolySet(), EDA_SHAPE::Compare(), ZONE::GetNumCorners(), ZONE::HitTest(), SHAPE_POLY_SET::InsertVertex(), FOOTPRINT::cmp_drawings::operator()(), FOOTPRINT::cmp_zones::operator()(), EDA_SHAPE::operator==(), shapeNeedsUpdate(), EDA_SHAPE::Similarity(), POLYGON_POINT_EDIT_BEHAVIOR::UpdateOutlineFromPoints(), POLYGON_POINT_EDIT_BEHAVIOR::UpdatePointsFromOutline(), and zoneNeedsUpdate().
|
inlineoverridevirtualinherited |
Fills a SHAPE_POLY_SET with a polygon representation of this shape.
aBuffer | [out] will be filled with the polygonal representation of this shape. |
aError | controls the maximum allowed deviation when converting rounded shapes to segments |
aErrorLoc | controls where the error is placed when approximating rounded shapes |
Implements SHAPE.
Definition at line 1473 of file shape_poly_set.h.
References SHAPE_POLY_SET::Append().
Referenced by EXPORTER_STEP::buildFootprint3DShapes(), EXPORTER_STEP::buildTrack3DShape(), and DRC_TEST_PROVIDER_ANNULAR_WIDTH::Run().
void OUTLINE_GLYPH::Triangulate | ( | std::function< void(const VECTOR2I &aPt1, const VECTOR2I &aPt2, const VECTOR2I &aPt3)> | aCallback | ) | const |
Definition at line 133 of file glyph.cpp.
References CacheTriangulation(), SHAPE_POLY_SET::TRIANGULATED_POLYGON::GetTriangle(), SHAPE_POLY_SET::TRIANGULATED_POLYGON::GetTriangleCount(), SHAPE_POLY_SET::TriangulatedPolyCount(), and SHAPE_POLY_SET::TriangulatedPolygon().
Referenced by CALLBACK_GAL::DrawGlyph(), and KIGFX::CAIRO_GAL_BASE::DrawGlyph().
|
inlineinherited |
Return the number of triangulated polygons.
Definition at line 702 of file shape_poly_set.h.
References SHAPE_POLY_SET::m_triangulatedPolys.
Referenced by CacheTriangulation(), ConvertPolygonToTriangles(), KIGFX::OPENGL_GAL::drawTriangulatedPolyset(), SHAPE_POLY_SET::operator=(), SHAPE_POLY_SET::SHAPE_POLY_SET(), PNS_KICAD_IFACE_BASE::syncZone(), and Triangulate().
|
inlineinherited |
Definition at line 770 of file shape_poly_set.h.
References SHAPE_POLY_SET::m_triangulatedPolys.
Referenced by ConvertPolygonToTriangles(), KIGFX::OPENGL_GAL::drawTriangulatedPolyset(), SHAPE_POLY_SET::operator=(), SHAPE_POLY_SET::SHAPE_POLY_SET(), PNS_KICAD_IFACE_BASE::syncZone(), and Triangulate().
|
inlineinherited |
Return the type of the shape.
the | type |
Definition at line 98 of file shape.h.
References SHAPE_BASE::m_type.
Referenced by CreepageGraph::Addshape(), PNS::DP_GATEWAYS::BuildFromPrimitivePair(), PNS::BuildHullForPrimitiveShape(), PNS_LOG_VIEWER_FRAME::buildListTree(), SHAPE_POLY_SET::Collide(), Collide(), collideShapes(), collideSingleShapes(), PNS::OPTIMIZER::computeBreakouts(), ROUTER_PREVIEW_ITEM::drawShape(), PNS_LOG_VIEWER_FRAME::drawSimpleShape(), EDA_SHAPE::EDA_SHAPE(), SHAPE::GetClearance(), PNS::HOLE::Hull(), PNS::SOLID::Hull(), DRC_RTREE::QueryColliding(), PNS::HOLE::Radius(), ROUTER_PREVIEW_ITEM::ROUTER_PREVIEW_ITEM(), PNS::HOLE::SetCenter(), PNS::HOLE::SetRadius(), STROKE_PARAMS::Stroke(), and SHAPE_FILE_IO::Write().
|
inlineinherited |
Definition at line 103 of file shape.h.
References SHAPE_BASE::m_type, and SHAPE_TYPE_asString().
Referenced by Collide().
|
inherited |
Convert a single outline slitted ("fractured") polygon into a set ouf outlines with holes.
Definition at line 2080 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::m_polys, path, SHAPE_POLY_SET::Simplify(), and SHAPE_POLY_SET::unfractureSingle().
Referenced by EXPORTER_STEP::buildZones3DShape(), and SHAPE_POLY_SET::InflateWithLinkedHoles().
|
privateinherited |
Definition at line 1898 of file shape_poly_set.cpp.
References SEG::A, SHAPE_LINE_CHAIN::Append(), SHAPE_LINE_CHAIN::Area(), SEG::B, SHAPE_LINE_CHAIN::CPoint(), SHAPE_LINE_CHAIN::CSegment(), hash_combine(), next(), operator!=(), operator==(), SHAPE_LINE_CHAIN::SegmentCount(), SHAPE_LINE_CHAIN::SetClosed(), SHAPE_LINE_CHAIN::Simplify(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by SHAPE_POLY_SET::Unfracture().
|
inlineinherited |
Definition at line 748 of file shape_poly_set.h.
References SHAPE_POLY_SET::Subset().
|
inherited |
Definition at line 2524 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::checksum(), SHAPE_POLY_SET::m_hash, and SHAPE_POLY_SET::m_hashValid.
|
inherited |
Return the number of vertices in a given outline/hole.
Definition at line 339 of file shape_poly_set.cpp.
References SHAPE_POLY_SET::m_polys.
Referenced by BOOST_AUTO_TEST_CASE(), SHAPE_POLY_SET::Collide(), D_CODE::DrawFlashedPolygon(), GERBER_FILE_IMAGE::Execute_G_Command(), EDA_SHAPE::GetPointCount(), FABMASTER::loadFootprints(), FABMASTER::loadShapePolySet(), and POLYGON_SUBTRACT_ROUTINE::ProcessSubsequentPolygon().
|
privateinherited |
Definition at line 143 of file wrlfacet.h.
Referenced by SHAPE::CalcShape(), and SHAPE::NewFacet().
|
privateinherited |
Definition at line 1589 of file shape_poly_set.h.
Referenced by SHAPE_POLY_SET::cacheTriangulation(), SHAPE_POLY_SET::DeletePolygonAndTriangulationData(), SHAPE_POLY_SET::GetHash(), SHAPE_POLY_SET::IsTriangulationUpToDate(), SHAPE_POLY_SET::Move(), SHAPE_POLY_SET::operator=(), SHAPE_POLY_SET::SHAPE_POLY_SET(), and SHAPE_POLY_SET::UpdateTriangulationDataHash().
|
privateinherited |
Definition at line 1590 of file shape_poly_set.h.
Referenced by SHAPE_POLY_SET::cacheTriangulation(), SHAPE_POLY_SET::DeletePolygonAndTriangulationData(), SHAPE_POLY_SET::GetHash(), SHAPE_POLY_SET::IsTriangulationUpToDate(), SHAPE_POLY_SET::Move(), SHAPE_POLY_SET::operator=(), SHAPE_POLY_SET::SHAPE_POLY_SET(), and SHAPE_POLY_SET::UpdateTriangulationDataHash().
|
protectedinherited |
Definition at line 1582 of file shape_poly_set.h.
Referenced by SHAPE_POLY_SET::AddHole(), SHAPE_POLY_SET::AddOutline(), SHAPE_POLY_SET::AddPolygon(), SHAPE_POLY_SET::Append(), SHAPE_POLY_SET::ArcCount(), SHAPE_POLY_SET::BBox(), SHAPE_POLY_SET::BBoxFromCaches(), SHAPE_POLY_SET::booleanOp(), SHAPE_POLY_SET::Chamfer(), SHAPE_POLY_SET::checksum(), SHAPE_POLY_SET::CHole(), SHAPE_POLY_SET::ClearArcs(), SHAPE_POLY_SET::Contains(), SHAPE_POLY_SET::containsSingle(), SHAPE_POLY_SET::COutline(), SHAPE_POLY_SET::CPolygon(), SHAPE_POLY_SET::CPolygons(), SHAPE_POLY_SET::CVertex(), SHAPE_POLY_SET::DeletePolygon(), SHAPE_POLY_SET::DeletePolygonAndTriangulationData(), SHAPE_POLY_SET::Fillet(), SHAPE_POLY_SET::Format(), SHAPE_POLY_SET::Fracture(), SHAPE_POLY_SET::FullPointCount(), SHAPE_POLY_SET::GetArcs(), SHAPE_POLY_SET::GetGlobalIndex(), SHAPE_POLY_SET::GetNeighbourIndexes(), SHAPE_POLY_SET::HasHoles(), SHAPE_POLY_SET::Hole(), SHAPE_POLY_SET::HoleCount(), SHAPE_POLY_SET::importPaths(), SHAPE_POLY_SET::importPolyPath(), SHAPE_POLY_SET::importTree(), SHAPE_POLY_SET::inflate1(), SHAPE_POLY_SET::inflate2(), SHAPE_POLY_SET::InsertVertex(), SHAPE_POLY_SET::IsEmpty(), SHAPE_POLY_SET::IsSelfIntersecting(), SHAPE_POLY_SET::Mirror(), SHAPE_POLY_SET::Move(), SHAPE_POLY_SET::NewHole(), SHAPE_POLY_SET::NewOutline(), SHAPE_POLY_SET::operator=(), SHAPE_POLY_SET::Outline(), SHAPE_POLY_SET::OutlineCount(), SHAPE_POLY_SET::Parse(), SHAPE_POLY_SET::PointOnEdge(), SHAPE_POLY_SET::Polygon(), SHAPE_POLY_SET::RebuildHolesFromContours(), SHAPE_POLY_SET::RemoveAllContours(), SHAPE_POLY_SET::RemoveContour(), SHAPE_POLY_SET::RemoveOutline(), SHAPE_POLY_SET::RemoveVertex(), SHAPE_POLY_SET::Rotate(), SHAPE_POLY_SET::SetVertex(), SHAPE_POLY_SET::SimplifyOutlines(), SHAPE_POLY_SET::SquaredDistance(), SHAPE_POLY_SET::SquaredDistanceToSeg(), SHAPE_POLY_SET::Subset(), SHAPE_POLY_SET::TotalVertices(), SHAPE_POLY_SET::Unfracture(), and SHAPE_POLY_SET::VertexCount().
|
protectedinherited |
Definition at line 1583 of file shape_poly_set.h.
Referenced by SHAPE_POLY_SET::cacheTriangulation(), SHAPE_POLY_SET::Collide(), SHAPE_POLY_SET::DeletePolygonAndTriangulationData(), SHAPE_POLY_SET::GetIndexableSubshapeCount(), SHAPE_POLY_SET::GetIndexableSubshapes(), GetTriangulationData(), SHAPE_POLY_SET::Move(), SHAPE_POLY_SET::operator=(), SHAPE_POLY_SET::SHAPE_POLY_SET(), SHAPE_POLY_SET::TriangulatedPolyCount(), and SHAPE_POLY_SET::TriangulatedPolygon().
|
protectedinherited |
Definition at line 1586 of file shape_poly_set.h.
Referenced by SHAPE_POLY_SET::cacheTriangulation().
|
protectedinherited |
Definition at line 1585 of file shape_poly_set.h.
Referenced by SHAPE_POLY_SET::cacheTriangulation(), SHAPE_POLY_SET::DeletePolygonAndTriangulationData(), SHAPE_POLY_SET::IsTriangulationUpToDate(), SHAPE_POLY_SET::Mirror(), SHAPE_POLY_SET::operator=(), SHAPE_POLY_SET::Rotate(), and SHAPE_POLY_SET::SHAPE_POLY_SET().
|
protectedinherited |
< type of our shape
Definition at line 119 of file shape.h.
Referenced by SHAPE::Format(), SHAPE::IsNull(), SHAPE_BASE::Type(), and SHAPE_BASE::TypeName().
|
staticinherited |
This is the minimum precision for all the points in a shape.
Definition at line 131 of file shape.h.
Referenced by BOOST_AUTO_TEST_CASE(), DIRECTION_45::BuildInitialTrace(), CompareLength(), CIRCLE::Contains(), EDIT_TOOL::FilletTracks(), CIRCLE::IntersectLine(), and LINE_FILLET_ROUTINE::ProcessLinePair().