![]() |
KiCad PCB EDA Suite
|
#include <shape_line_chain.h>
Classes | |
struct | compareOriginDistance |
struct | INTERSECTION |
Struct INTERSECTION. More... | |
class | POINT_INSIDE_TRACKER |
Class POINT_INSIDE_TRACKER. More... | |
Public Types | |
typedef std::vector< INTERSECTION > | INTERSECTIONS |
Public Member Functions | |
SHAPE_LINE_CHAIN () | |
Constructor Initializes an empty line chain. More... | |
SHAPE_LINE_CHAIN (const SHAPE_LINE_CHAIN &aShape) | |
Copy Constructor. More... | |
SHAPE_LINE_CHAIN (const std::vector< int > &aV) | |
SHAPE_LINE_CHAIN (const std::vector< wxPoint > &aV, bool aClosed=false) | |
SHAPE_LINE_CHAIN (const std::vector< VECTOR2I > &aV, bool aClosed=false) | |
SHAPE_LINE_CHAIN (const SHAPE_ARC &aArc, bool aClosed=false) | |
SHAPE_LINE_CHAIN (const ClipperLib::Path &aPath) | |
virtual | ~SHAPE_LINE_CHAIN () |
SHAPE_LINE_CHAIN & | operator= (const SHAPE_LINE_CHAIN &)=default |
SHAPE * | Clone () const override |
Function Clone() More... | |
void | Clear () |
Function Clear() Removes all points from the line chain. More... | |
void | SetClosed (bool aClosed) |
Function SetClosed() More... | |
bool | IsClosed () const override |
Function IsClosed() More... | |
void | SetWidth (int aWidth) |
Sets the width of all segments in the chain. More... | |
int | Width () const |
Gets the current width of the segments in the chain. More... | |
int | SegmentCount () const |
Function SegmentCount() More... | |
int | ShapeCount () const |
Returns the number of shapes (line segments or arcs) in this line chain. More... | |
int | PointCount () const |
Function PointCount() More... | |
SEG | Segment (int aIndex) |
Function Segment() More... | |
const SEG | CSegment (int aIndex) const |
Function CSegment() More... | |
int | NextShape (int aPointIndex, bool aForwards=true) const |
Returns the vertex index of the next shape in the chain, or -1 if aPoint is in the last shape If aPoint is the start of a segment, this will be ( aPoint + 1 ). More... | |
int | PrevShape (int aPointIndex) const |
void | SetPoint (int aIndex, const VECTOR2I &aPos) |
Accessor Function to move a point to a specific location. More... | |
const VECTOR2I & | CPoint (int aIndex) const |
Function Point() More... | |
const std::vector< VECTOR2I > & | CPoints () const |
const VECTOR2I & | CLastPoint () const |
Returns the last point in the line chain. More... | |
const std::vector< SHAPE_ARC > & | CArcs () const |
const std::vector< ssize_t > & | CShapes () const |
const BOX2I | BBox (int aClearance=0) const override |
Function BBox() More... | |
void | GenerateBBoxCache () |
const BOX2I | BBoxFromCache () const |
int | Distance (const VECTOR2I &aP, bool aOutlineOnly=false) const |
Function Distance() More... | |
const SHAPE_LINE_CHAIN | Reverse () const |
Function Reverse() More... | |
long long int | Length () const |
Function Length() More... | |
void | Append (int aX, int aY, bool aAllowDuplication=false) |
Function Append() More... | |
void | Append (const VECTOR2I &aP, bool aAllowDuplication=false) |
Function Append() More... | |
void | Append (const SHAPE_LINE_CHAIN &aOtherLine) |
Function Append() More... | |
void | Append (const SHAPE_ARC &aArc) |
void | Insert (size_t aVertex, const VECTOR2I &aP) |
void | Insert (size_t aVertex, const SHAPE_ARC &aArc) |
void | Replace (int aStartIndex, int aEndIndex, const VECTOR2I &aP) |
Function Replace() More... | |
void | Replace (int aStartIndex, int aEndIndex, const SHAPE_LINE_CHAIN &aLine) |
Function Replace() More... | |
void | Remove (int aStartIndex, int aEndIndex) |
Function Remove() More... | |
void | Remove (int aIndex) |
Function Remove() removes the aIndex-th point from the line chain. More... | |
void | RemoveShape (int aPointIndex) |
Removes the shape at the given index from the line chain. More... | |
int | Split (const VECTOR2I &aP) |
Function Split() More... | |
int | Find (const VECTOR2I &aP) const |
Function Find() More... | |
int | FindSegment (const VECTOR2I &aP) const |
Function FindSegment() More... | |
const SHAPE_LINE_CHAIN | Slice (int aStartIndex, int aEndIndex=-1) const |
Function Slice() More... | |
bool | Intersects (const SHAPE_LINE_CHAIN &aChain) const |
int | Intersect (const SEG &aSeg, INTERSECTIONS &aIp) const |
Function Intersect() More... | |
int | Intersect (const SHAPE_LINE_CHAIN &aChain, INTERSECTIONS &aIp) const |
Function Intersect() More... | |
int | PathLength (const VECTOR2I &aP) const |
Function PathLength() More... | |
bool | CheckClearance (const VECTOR2I &aP, const int aDist) const |
Function CheckClearance() More... | |
const OPT< INTERSECTION > | SelfIntersecting () const |
Function SelfIntersecting() More... | |
SHAPE_LINE_CHAIN & | Simplify (bool aRemoveColinear=true) |
Function Simplify() More... | |
void | convertArc (ssize_t aArcIndex) |
Converts an arc to only a point chain by removing the arc and references. More... | |
ClipperLib::Path | convertToClipper (bool aRequiredOrientation) const |
Creates a new Clipper path from the SHAPE_LINE_CHAIN in a given orientation. More... | |
int | NearestSegment (const VECTOR2I &aP) const |
Find the segment nearest the given point. More... | |
const VECTOR2I | NearestPoint (const VECTOR2I &aP, bool aAllowInternalShapePoints=true) const |
Finds a point on the line chain that is closest to point aP. More... | |
const VECTOR2I | NearestPoint (const SEG &aSeg, int &dist) const |
Finds a point on the line chain that is closest to the line defined by the points of segment aSeg, also returns the distance. More... | |
const std::string | Format () const override |
bool | Parse (std::stringstream &aStream) override |
bool | operator!= (const SHAPE_LINE_CHAIN &aRhs) const |
bool | CompareGeometry (const SHAPE_LINE_CHAIN &aOther) const |
void | Move (const VECTOR2I &aVector) override |
void | Mirror (bool aX=true, bool aY=false, const VECTOR2I &aRef={ 0, 0 }) |
Mirrors the line points about y or x (or both) More... | |
void | Rotate (double aAngle, const VECTOR2I &aCenter=VECTOR2I(0, 0)) override |
Function Rotate rotates all vertices by a given angle. More... | |
bool | IsSolid () const override |
const VECTOR2I | PointAlong (int aPathLength) const |
double | Area () const |
size_t | ArcCount () const |
ssize_t | ArcIndex (size_t aSegment) const |
const SHAPE_ARC & | Arc (size_t aArc) const |
bool | isArc (size_t aSegment) const |
virtual const VECTOR2I | GetPoint (int aIndex) const override |
virtual const SEG | GetSegment (int aIndex) const override |
virtual size_t | GetPointCount () const override |
virtual size_t | GetSegmentCount () const override |
virtual bool | Collide (const VECTOR2I &aP, int aClearance=0, int *aActual=nullptr, VECTOR2I *aLocation=nullptr) const override |
Function Collide() More... | |
virtual bool | Collide (const SEG &aSeg, int aClearance=0, int *aActual=nullptr, VECTOR2I *aLocation=nullptr) const override |
Function Collide() More... | |
virtual bool | Collide (const SHAPE *aShape, int aClearance, VECTOR2I *aMTV) const |
Function Collide() More... | |
virtual bool | Collide (const SHAPE *aShape, int aClearance=0, int *aActual=nullptr, VECTOR2I *aLocation=nullptr) const |
SEG::ecoord | SquaredDistance (const VECTOR2I &aP, bool aOutlineOnly=false) const |
bool | PointInside (const VECTOR2I &aPt, int aAccuracy=0, bool aUseBBoxCache=false) const |
Function PointInside() More... | |
bool | PointOnEdge (const VECTOR2I &aP, int aAccuracy=0) const |
Function PointOnEdge() More... | |
int | EdgeContainingPoint (const VECTOR2I &aP, int aAccuracy=0) const |
Function EdgeContainingPoint() More... | |
bool | IsNull () const |
Function IsNull() More... | |
virtual VECTOR2I | Centre () const |
Function Centre() More... | |
FACET * | NewFacet () |
SGNODE * | CalcShape (SGNODE *aParent, SGNODE *aColor, WRL1_ORDER aVertexOrder, float aCreaseLimit=0.74317, bool isVRML2=false) |
SHAPE_TYPE | Type () const |
Function Type() More... | |
virtual bool | HasIndexableSubshapes () const |
virtual size_t | GetIndexableSubshapeCount () const |
virtual void | GetIndexableSubshapes (std::vector< SHAPE * > &aSubshapes) |
Protected Types | |
typedef VECTOR2I::extended_type | ecoord |
Protected Attributes | |
SHAPE_TYPE | m_type |
More... | |
Private Types | |
typedef std::vector< VECTOR2I >::iterator | point_iter |
typedef std::vector< VECTOR2I >::const_iterator | point_citer |
Private Attributes | |
std::vector< VECTOR2I > | m_points |
array of vertices More... | |
std::vector< ssize_t > | m_shapes |
Array of indices that refer to the index of the shape if the point is part of a larger shape, e.g. More... | |
std::vector< SHAPE_ARC > | m_arcs |
bool | m_closed |
is the line chain closed? More... | |
int | m_width |
Width of the segments (for BBox calculations in RTree) TODO Adjust usage of SHAPE_LINE_CHAIN to account for where we need a width and where not Alternatively, we could split the class into a LINE_CHAIN (no width) and SHAPE_LINE_CHAIN that derives from SHAPE as well that does have a width. More... | |
BOX2I | m_bbox |
cached bounding box More... | |
Static Private Attributes | |
static constexpr ssize_t | SHAPE_IS_PT = -1 |
Represents a polyline (an zero-thickness chain of connected line segments). I purposedly didn't name it "polyline" to avoid confusion with the existing CPolyLine in pcbnew.
SHAPE_LINE_CHAIN class shall not be used for polygons!
Definition at line 46 of file shape_line_chain.h.
|
protectedinherited |
typedef std::vector<INTERSECTION> SHAPE_LINE_CHAIN::INTERSECTIONS |
Definition at line 95 of file shape_line_chain.h.
|
private |
Definition at line 50 of file shape_line_chain.h.
|
private |
Definition at line 49 of file shape_line_chain.h.
|
inline |
Constructor Initializes an empty line chain.
Definition at line 102 of file shape_line_chain.h.
Referenced by Clone().
|
inline |
Copy Constructor.
Definition at line 109 of file shape_line_chain.h.
SHAPE_LINE_CHAIN::SHAPE_LINE_CHAIN | ( | const std::vector< int > & | aV | ) |
Definition at line 39 of file shape_line_chain.cpp.
References Append().
|
inline |
Definition at line 121 of file shape_line_chain.h.
References m_points, m_shapes, and SHAPE_IS_PT.
|
inline |
Definition at line 132 of file shape_line_chain.h.
References m_points, m_shapes, and SHAPE_IS_PT.
|
inline |
Definition at line 139 of file shape_line_chain.h.
References SHAPE_ARC::ConvertToPolyline(), CPoints(), m_arcs, m_points, and m_shapes.
|
inline |
Definition at line 149 of file shape_line_chain.h.
References m_points, m_shapes, and SHAPE_IS_PT.
|
inlinevirtual |
Definition at line 161 of file shape_line_chain.h.
|
inline |
Function Append()
Appends a new point at the end of the line chain.
aX | is X coordinate of the new point |
aY | is Y coordinate of the new point |
aAllowDuplication | = true to append the new point even it is the same as the last entered point false (default) to skip it if it is the same as the last entered point |
Definition at line 431 of file shape_line_chain.h.
Referenced by PNS_PCBNEW_DEBUG_DECORATOR::AddBox(), ZONE_FILLER::addHatchFillTypeOnZone(), POLYGON_GEOM_MANAGER::AddPoint(), PNS_PCBNEW_DEBUG_DECORATOR::AddPoint(), ZONE::AddPolygon(), PNS_PCBNEW_DEBUG_DECORATOR::AddSegment(), PNS::POSTURE_SOLVER::AddTrailPoint(), SHAPE_SIMPLE::Append(), PNS::DIFF_PAIR::Append(), PNS::ArcHull(), PNS::NODE::AssembleLine(), buildBoardBoundingBoxPoly(), PAD::BuildEffectiveShapes(), BuildFootprintPolygonOutlines(), PNS::DIFF_PAIR::BuildInitial(), DIRECTION_45::BuildInitialTrace(), ZONE_FILLER::buildThermalSpokes(), SHAPE_POLY_SET::chamferFilletPolygon(), PNS::KEEP_TOPOLOGY_CONSTRAINT::Check(), PNS::OPTIMIZER::circleBreakouts(), PNS::clipToLoopStart(), KI_TEST::CommonTestData::CommonTestData(), GRID_HELPER::computeAnchors(), SCH_SHEET_PIN::ConstrainOnEdge(), SHAPE_ARC::ConvertToPolyline(), PNS::ConvexHull(), PLACEFILE_GERBER_WRITER::CreatePlaceFile(), PNS::OPTIMIZER::customBreakouts(), PNS::MEANDER_PLACER::doMove(), PNS::LINE::dragCorner45(), PNS::dragCornerInternal(), PNS::LINE::dragSegment45(), PNS::MEANDER_SHAPE::forward(), SHAPE_POLY_SET::fractureSingle(), PNS::MEANDER_SHAPE::genMeanderShape(), CADSTAR_PCB_ARCHIVE_LOADER::getLineChainFromDrawsegments(), PNS::POSTURE_SOLVER::GetPosture(), HelperShapeLineChainFromAltiumVertices(), LIB_POLYLINE::HitTest(), PNS::ROUTER::isStartingPointRoutable(), IteratorFixture::IteratorFixture(), PNS::TOPOLOGY::LeadingRatLine(), CADSTAR_SCH_ARCHIVE_LOADER::loadBusses(), CADSTAR_SCH_ARCHIVE_LOADER::loadNets(), PNS::MEANDER_SHAPE::MakeCorner(), PNS::MEANDER_SHAPE::makeMiterShape(), CONVERT_TOOL::makePolysFromRects(), CONVERT_TOOL::makePolysFromSegs(), GEOM_TEST::MakeSquarePolyLine(), PNS::LINE_PLACER::mergeHead(), PNS::OPTIMIZER::mergeObtuse(), PNS::MEANDER_SHAPE::miter(), PNS::DP_MEANDER_PLACER::Move(), PNS::OctagonalHull(), ZONE_CREATE_HELPER::OnComplete(), PNS::LINE_PLACER::optimizeTailHeadTransition(), SHAPE_RECT::Outline(), SHAPE_POLY_SET::Parse(), ALTIUM_PCB::ParseRegions6Data(), partitionPolyIntoRegularCellGrid(), BRDITEMS_PLOTTER::PlotFootprintGraphicItem(), BRDITEMS_PLOTTER::PlotPcbShape(), CONVERT_TOOL::PolyToLines(), PNS::LINE_PLACER::rhShoveOnly(), PNS::WALKAROUND::Route(), PNS::SegmentHull(), SHAPE_LINE_CHAIN(), MARKER_BASE::ShapeToPolygon(), PNS::WALKAROUND::singleStep(), Slice(), PNS::OPTIMIZER::smartPadsSingle(), PNS::MEANDER_SHAPE::start(), TestConcaveSquareFillet(), PNS::tightenSegment(), PNS::LINE_PLACER::Trace(), TransformCircleToPolygon(), unfracture(), SHAPE_POLY_SET::unfractureSingle(), POLYGON_GEOM_MANAGER::updateLeaderPoints(), and PNS::LINE::Walkaround().
|
inline |
Function Append()
Appends a new point at the end of the line chain.
aP | the new point |
aAllowDuplication | = true to append the new point even it is the same as the last entered point false (default) to skip it if it is the same as the last entered point |
Definition at line 446 of file shape_line_chain.h.
References CPoint(), m_bbox, m_points, m_shapes, BOX2< Vec >::Merge(), and SHAPE_IS_PT.
void SHAPE_LINE_CHAIN::Append | ( | const SHAPE_LINE_CHAIN & | aOtherLine | ) |
Function Append()
Appends another line chain at the end.
aOtherLine | the line chain to be appended. |
Definition at line 579 of file shape_line_chain.cpp.
References ArcIndex(), CPoint(), CShapes(), m_arcs, m_bbox, m_points, m_shapes, BOX2< Vec >::Merge(), PointCount(), and SHAPE_IS_PT.
void SHAPE_LINE_CHAIN::Append | ( | const SHAPE_ARC & | aArc | ) |
Definition at line 616 of file shape_line_chain.cpp.
References SHAPE_ARC::ConvertToPolyline(), m_arcs, m_points, and m_shapes.
|
inline |
Definition at line 741 of file shape_line_chain.h.
References m_arcs.
Referenced by PNS::NODE::Add(), and PNS::LINE_PLACER::FixRoute().
|
inline |
Definition at line 728 of file shape_line_chain.h.
References m_arcs.
Referenced by PNS::LINE::ArcCount(), ROUTER_PREVIEW_ITEM::drawLineChain(), and PNS::LINE_PLACER::FixRoute().
|
inline |
Definition at line 733 of file shape_line_chain.h.
References m_shapes, and SHAPE_IS_PT.
Referenced by Append(), and PNS::LINE_PLACER::FixRoute().
double SHAPE_LINE_CHAIN::Area | ( | ) | const |
Definition at line 1271 of file shape_line_chain.cpp.
References m_closed, and m_points.
Referenced by ZONE_FILLER::addHatchFillTypeOnZone(), ZONE::CalculateFilledArea(), ZONE_FILLER::Fill(), FOOTPRINT::GetCoverageArea(), DIALOG_BOARD_STATISTICS::getDataFromPCB(), PNS::POSTURE_SOLVER::GetPosture(), PlotSolderMaskLayer(), polygonArea(), unfracture(), and SHAPE_POLY_SET::unfractureSingle().
|
inlineoverridevirtual |
Function BBox()
Computes 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 372 of file shape_line_chain.h.
References BOX2< Vec >::Compute(), BOX2< Vec >::Inflate(), m_points, and m_width.
Referenced by SHAPE_SIMPLE::BBox(), POLY_GRID_PARTITION::build(), PNS::KEEP_TOPOLOGY_CONSTRAINT::Check(), AR_AUTOPLACER::fillMatrix(), DIALOG_BOARD_STATISTICS::getDataFromPCB(), Intersect(), and PolygonTriangulation::TesselatePolygon().
|
inline |
|
inherited |
Definition at line 713 of file wrlfacet.cpp.
References IFSG_NODE::AddChildNode(), IFSG_INDEX::AddIndex(), IFSG_NODE::AddRefNode(), colors, SHAPE::facets, IFSG_NODE::GetRawPtr(), S3D::GetSGNodeParent(), IFSG_FACESET::NewNode(), IFSG_SHAPE::NewNode(), NULL, IFSG_COLORS::SetColorList(), IFSG_COORDS::SetCoordsList(), IFSG_NORMALS::SetNormalList(), SGPOINT::x, SGPOINT::y, and SGPOINT::z.
Referenced by WRL1FACESET::TranslateToSG(), X3DIFACESET::TranslateToSG(), and WRL2FACESET::TranslateToSG().
|
inline |
Definition at line 358 of file shape_line_chain.h.
References m_arcs.
Referenced by ROUTER_PREVIEW_ITEM::drawLineChain(), PNS::LINE_PLACER::handlePullback(), and PNS::LINE_PLACER::mergeHead().
|
inlinevirtualinherited |
Function Centre()
Computes a center-of-mass of the shape
Definition at line 229 of file shape.h.
References SHAPE::BBox(), and BOX2< Vec >::Centre().
Referenced by Collide().
bool SHAPE_LINE_CHAIN::CheckClearance | ( | const VECTOR2I & | aP, |
const int | aDist | ||
) | const |
Function CheckClearance()
Checks if point aP is closer to (or on) an edge or vertex of the line chain.
aP | point to check |
aDist | distance in internal units |
Definition at line 883 of file shape_line_chain.cpp.
References SEG::A, SEG::B, CSegment(), SEG::Distance(), m_points, PointCount(), and SegmentCount().
|
inline |
Returns the last point in the line chain.
Definition at line 350 of file shape_line_chain.h.
References m_points, and PointCount().
Referenced by POLYGON_GEOM_MANAGER::DeleteLastCorner(), and POLYGON_GEOM_MANAGER::updateLeaderPoints().
|
inline |
Function Clear() Removes all points from the line chain.
Definition at line 172 of file shape_line_chain.h.
References m_arcs, m_closed, m_points, and m_shapes.
Referenced by PNS_PCBNEW_DEBUG_DECORATOR::AddPoint(), PNS::LINE_PLACER::buildInitialLine(), SHAPE_SIMPLE::Clear(), PNS::POSTURE_SOLVER::Clear(), PNS::LINE::Clear(), PNS::DIFF_PAIR::Clear(), PNS::LINE::ClipToNearestObstacle(), KI_TEST::CommonTestData::CommonTestData(), PNS::MEANDER_PLACER::doMove(), PNS::LINE_PLACER::FixRoute(), PNS::POSTURE_SOLVER::GetPosture(), PNS::LINE_PLACER::handlePullback(), PNS::LINE_PLACER::handleSelfIntersections(), PNS::LINE_PLACER::initPlacement(), IteratorFixture::IteratorFixture(), PNS::TOPOLOGY::LeadingRatLine(), PNS::MEANDER_SHAPE::MakeCorner(), PNS::DP_MEANDER_PLACER::Move(), PNS::SHOVE::onReverseCollidingVia(), PNS::LINE_PLACER::optimizeTailHeadTransition(), PNS::LINE_PLACER::reduceTail(), POLYGON_GEOM_MANAGER::Reset(), PNS::LINE_PLACER::SetLayer(), PNS::MEANDER_SHAPE::start(), PNS::tightenSegment(), PNS::LINE_PLACER::UnfixRoute(), and PNS::LINE::Walkaround().
|
overridevirtual |
Function Clone()
Returns a dynamically allocated copy of the shape
copy | of the shape |
Reimplemented from SHAPE.
Definition at line 1194 of file shape_line_chain.cpp.
References SHAPE_LINE_CHAIN().
Referenced by ROUTER_PREVIEW_ITEM::Line().
|
virtualinherited |
Function Collide()
Checks 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 | 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_RECT, SHAPE_SEGMENT, and SHAPE_COMPOUND.
Definition at line 852 of file shape_collisions.cpp.
References collideShapes().
|
virtualinherited |
Reimplemented in SHAPE_POLY_SET, SHAPE_RECT, SHAPE_SEGMENT, and SHAPE_COMPOUND.
Definition at line 858 of file shape_collisions.cpp.
References collideShapes().
|
overridevirtualinherited |
Function Collide()
Checks if point aP lies closer to us than aClearance.
aP | the point to check for collisions with |
aClearance | minimum distance that does not qualify as 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 88 of file shape_line_chain.cpp.
References VECTOR2< T >::ECOORD_MAX, SHAPE_LINE_CHAIN_BASE::GetSegment(), SHAPE_LINE_CHAIN_BASE::GetSegmentCount(), SHAPE_LINE_CHAIN_BASE::IsClosed(), SEG::NearestPoint(), SHAPE_LINE_CHAIN_BASE::PointInside(), and SEG::Square().
Referenced by PNS::MEANDERED_LINE::CheckSelfIntersections(), SHAPE_SIMPLE::Collide(), Collide(), and PCB_SELECTION_TOOL::hitTestDistance().
|
overridevirtualinherited |
Function Collide()
Checks if segment aSeg lies closer to us than aClearance.
aSeg | the segment to check for collisions with |
aClearance | minimum distance that does not qualify as a collision. |
aActual | an optional pointer to an int to store the actual distance in the event of a collision. |
Implements SHAPE.
Reimplemented in SHAPE_SIMPLE.
Definition at line 155 of file shape_line_chain.cpp.
References SEG::A, VECTOR2< T >::ECOORD_MAX, SHAPE_LINE_CHAIN_BASE::GetSegment(), SHAPE_LINE_CHAIN_BASE::GetSegmentCount(), SHAPE_LINE_CHAIN_BASE::IsClosed(), SEG::NearestPoint(), SHAPE_LINE_CHAIN_BASE::PointInside(), SEG::Square(), and SEG::SquaredDistance().
bool SHAPE_LINE_CHAIN::CompareGeometry | ( | const SHAPE_LINE_CHAIN & | aOther | ) | const |
Definition at line 1171 of file shape_line_chain.cpp.
References CPoint(), m_points, and Simplify().
Referenced by PNS::LINE::CompareGeometry(), and PNS::SHOVE::shoveLineToHullSet().
void SHAPE_LINE_CHAIN::convertArc | ( | ssize_t | aArcIndex | ) |
Converts an arc to only a point chain by removing the arc and references.
aArcIndex | index of the arc to convert to points |
Definition at line 66 of file shape_line_chain.cpp.
References m_arcs, m_shapes, and SHAPE_IS_PT.
Referenced by Insert(), Remove(), Replace(), and SetPoint().
ClipperLib::Path SHAPE_LINE_CHAIN::convertToClipper | ( | bool | aRequiredOrientation | ) | const |
Creates a new Clipper path from the SHAPE_LINE_CHAIN in a given orientation.
Definition at line 48 of file shape_line_chain.cpp.
References CPoint(), PointCount(), VECTOR2< T >::x, and VECTOR2< T >::y.
|
inline |
Function Point()
Returns a const reference to a given point in the line chain.
aIndex | index of the point |
Definition at line 332 of file shape_line_chain.h.
References m_points, and PointCount().
Referenced by POLYGON_GEOM_MANAGER::AddPoint(), SHAPE_LINE_CHAIN::POINT_INSIDE_TRACKER::AddPolyline(), BOARD_ADAPTER::addSolidAreasShapes(), TRIANGLE_DISPLAY_LIST::AddToMiddleContourns(), PNS::POSTURE_SOLVER::AddTrailPoint(), Append(), PNS::LINE::AppendVia(), ArePolylineEndPointsNearCircle(), ArePolylineMidPointsNearCircle(), BOOST_AUTO_TEST_CASE(), BuildConvexHull(), PAD::BuildEffectivePolygon(), PAD::BuildEffectiveShapes(), PNS::LINE_PLACER::buildInitialLine(), BOARD_ADAPTER::buildPadOutlineAsPolygon(), BOARD_ADAPTER::buildPadOutlineAsSegments(), SHAPE_POLY_SET::chamferFilletPolygon(), PNS::LINE::ChangedArea(), PNS::KEEP_TOPOLOGY_CONSTRAINT::Check(), CN_VISITOR::checkZoneZoneConnection(), CompareGeometry(), convertToClipper(), PNS::coupledBypass(), SHAPE_SIMPLE::CPoint(), PNS::LINE::CPoint(), PolygonTriangulation::createList(), CreatePadsShapesSection(), PNS::dragCornerInternal(), PNS::LINE::dragSegment45(), APERTURE_MACRO::DrawApertureMacroShape(), KIGFX::CAIRO_GAL_BASE::drawPoly(), KIGFX::OPENGL_GAL::DrawPolygon(), KIGFX::OPENGL_GAL::DrawPolyline(), export_vrml_board(), export_vrml_padshape(), export_vrml_polygon(), export_vrml_zones(), DSN::SPECCTRA_DB::fillBOUNDARY(), AR_AUTOPLACER::fillMatrix(), Find(), PNS::LINE_PLACER::FixRoute(), GERBER_PLOTTER::FlashPadChamferRoundRect(), PSLIKE_PLOTTER::FlashPadCustom(), DXF_PLOTTER::FlashPadCustom(), HPGL_PLOTTER::FlashPadCustom(), GERBER_PLOTTER::FlashPadCustom(), PSLIKE_PLOTTER::FlashPadRoundRect(), DXF_PLOTTER::FlashPadRoundRect(), HPGL_PLOTTER::FlashPadRoundRect(), GERBER_PLOTTER::FlashPadRoundRect(), PNS::TOPOLOGY::followTrivialPath(), PCB_IO::format(), PNS::MEANDER_SHAPE::genMeanderShape(), CN_ZONE_LAYER::GetAnchor(), SHAPE_SIMPLE::GetPoint(), GetPoint(), PNS::POSTURE_SOLVER::GetPosture(), PNS::LINE_PLACER::handlePullback(), PNS::LINE_PLACER::handleSelfIntersections(), WS_DRAW_ITEM_POLYPOLYGONS::HitTest(), POLYGON_GEOM_MANAGER::IsSelfIntersecting(), DSN::SPECCTRA_DB::makePADSTACK(), PNS::LINE_PLACER::mergeHead(), PNS::MEANDER_SHAPE::miter(), PNS::LINE_PLACER::Move(), NearestPoint(), POLYGON_GEOM_MANAGER::NewPointClosesOutline(), operator!=(), BOOST_TEST_PRINT_NAMESPACE_OPEN::print_log_value< SHAPE_LINE_CHAIN >::operator()(), PNS::LINE_PLACER::optimizeTailHeadTransition(), BITMAPCONV_INFO::outputOnePolygon(), BRDITEMS_PLOTTER::PlotFilledAreas(), PlotLayerOutlines(), DXF_PLOTTER::PlotPoly(), PLOTTER::PlotPoly(), PlotSolderMaskLayer(), PlotWorkSheet(), PointAlong(), PNS::pointInside2(), polygon_Convert(), GERBER_DRAW_ITEM::PrintGerberPoly(), WS_DRAW_ITEM_POLYPOLYGONS::PrintWsItem(), PNS::LINE_PLACER::removeLoops(), PNS::DIFF_PAIR_PLACER::routeHead(), PNS::OPTIMIZER::runSmartPads(), KIGFX::PREVIEW::POLYGON_ITEM::SetPoints(), PNS::shovedArea(), PNS::SHOVE::shoveLineFromLoneVia(), PNS::SHOVE::shoveLineToHullSet(), Simplify(), DXF_PLOTTER::ThickSegment(), unfracture(), SHAPE_POLY_SET::unfractureSingle(), PNS::MEANDER_SHAPE::updateBaseSegment(), POLYGON_GEOM_MANAGER::updateLeaderPoints(), PNS::LINE::Walkaround(), HYPERLYNX_EXPORTER::writeNetObjects(), GBR_TO_PCB_EXPORTER::writePcbPolygon(), and GBR_TO_PCB_EXPORTER::writePcbZoneItem().
|
inline |
Definition at line 342 of file shape_line_chain.h.
References m_points.
Referenced by BOOST_AUTO_TEST_CASE(), DIALOG_PAD_PRIMITIVE_POLY_PROPS::DIALOG_PAD_PRIMITIVE_POLY_PROPS(), DIALOG_PAD_PRIMITIVE_POLY_PROPS::doValidate(), KIGFX::GERBVIEW_PAINTER::draw(), KIGFX::GERBVIEW_PAINTER::drawPolygon(), CADSTAR_SCH_ARCHIVE_LOADER::loadNets(), PCB_SHAPE::Scale(), and SHAPE_LINE_CHAIN().
|
inline |
Function CSegment()
Returns a constant copy of the aIndex-th segment in the line chain.
aIndex | index of the segment in the line chain. Negative values are counted from the end (i.e. -1 means the last segment in the line chain) |
Definition at line 280 of file shape_line_chain.h.
References m_closed, m_points, and SegmentCount().
Referenced by PNS::POSTURE_SOLVER::AddTrailPoint(), PNS::ArcHull(), PNS::LINE_PLACER::buildInitialLine(), PNS::PRESERVE_VERTEX_CONSTRAINT::Check(), CheckClearance(), PNS::NODE::CheckColliding(), PNS::DIFF_PAIR::CheckConnectionAngle(), PNS::checkGap(), PNS::MEANDERED_LINE::CheckSelfIntersections(), PNS::closestProjectedPoint(), GRID_HELPER::computeAnchors(), PNS::COST_ESTIMATOR::CornerCost(), PNS::LINE::CountCorners(), PNS::coupledBypass(), PNS::DIFF_PAIR::CoupledLength(), PNS::LINE::CSegment(), PNS::MEANDER_PLACER_BASE::cutTunedLine(), PNS::dragCornerInternal(), PNS::LINE::dragSegment45(), PNS::findCoupledVertices(), FindSegment(), PNS::DIFF_PAIR_PLACER::FixRoute(), PNS::LINE_PLACER::FixRoute(), PCB_SHAPE::GetLength(), PNS::POSTURE_SOLVER::GetPosture(), SHAPE_SIMPLE::GetSegment(), GetSegment(), PNS::LINE_PLACER::handlePullback(), PNS::LINE_PLACER::handleSelfIntersections(), Intersect(), PNS::LINE::Is45Degree(), Length(), PNS::OPTIMIZER::mergeColinear(), PNS::OPTIMIZER::mergeDpStep(), PNS::LINE_PLACER::mergeHead(), PNS::OPTIMIZER::mergeObtuse(), PNS::OPTIMIZER::mergeStep(), PNS::NODE::NearestObstacle(), NearestPoint(), NearestSegment(), PathLength(), PointAlong(), PNS::LINE_PLACER::reduceTail(), DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run(), POLY_GRID_PARTITION::scanCell(), PNS::SegmentHull(), SelfIntersecting(), PNS::OPTIMIZER::smartPadsSingle(), PNS::LINE::snapDraggedCorner(), PNS::LINE::snapToNeighbourSegments(), Split(), PNS::tightenSegment(), SHAPE_POLY_SET::unfractureSingle(), PNS::LINE::Walkaround(), and HYPERLYNX_EXPORTER::writeBoardInfo().
|
inline |
Definition at line 366 of file shape_line_chain.h.
References m_shapes.
Referenced by Append(), BOOST_AUTO_TEST_CASE(), PNS::LINE::ClipVertexRange(), PNS::LINE_PLACER::FixRoute(), PNS::LINE_PLACER::handlePullback(), and PNS::LINE_PLACER::mergeHead().
int SHAPE_LINE_CHAIN::Distance | ( | const VECTOR2I & | aP, |
bool | aOutlineOnly = false |
||
) | const |
Function Distance()
Computes the minimum distance between the line chain and a point aP.
aP | the point |
Definition at line 346 of file shape_line_chain.cpp.
References SHAPE_LINE_CHAIN_BASE::SquaredDistance().
Referenced by PAD::GetBestAnchorPosition().
|
inherited |
Function EdgeContainingPoint()
Checks if point aP lies on an edge or vertex of the line chain.
aP | point to check |
Definition at line 857 of file shape_line_chain.cpp.
References SEG::A, SEG::B, SEG::Distance(), SHAPE_LINE_CHAIN_BASE::GetPoint(), SHAPE_LINE_CHAIN_BASE::GetPointCount(), SHAPE_LINE_CHAIN_BASE::GetSegment(), SHAPE_LINE_CHAIN_BASE::GetSegmentCount(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by SHAPE_LINE_CHAIN_BASE::PointOnEdge(), and PNS::LINE::Walkaround().
int SHAPE_LINE_CHAIN::Find | ( | const VECTOR2I & | aP | ) | const |
Function Find()
Searches for point aP.
aP | the point to be looked for |
Definition at line 410 of file shape_line_chain.cpp.
References CPoint(), and PointCount().
Referenced by PNS::MEANDER_PLACER_BASE::cutTunedLine(), PNS::DRAGGER::dragViaMarkObstacles(), PNS::DRAGGER::dragViaWalkaround(), PNS::NODE::FindLinesBetweenJoints(), PNS::DRAGGER::optimizeAndUpdateDraggedLine(), Split(), and PNS::LINE::Walkaround().
int SHAPE_LINE_CHAIN::FindSegment | ( | const VECTOR2I & | aP | ) | const |
Function FindSegment()
Searches for segment containing point aP.
aP | the point to be looked for |
Definition at line 420 of file shape_line_chain.cpp.
References CSegment(), SEG::Distance(), and SegmentCount().
Referenced by PNS::MEANDER_PLACER_BASE::cutTunedLine(), and CADSTAR_SCH_ARCHIVE_LOADER::loadNets().
|
overridevirtual |
Reimplemented from SHAPE.
Definition at line 1140 of file shape_line_chain.cpp.
References m_closed, m_points, and PointCount().
|
inline |
Definition at line 383 of file shape_line_chain.h.
References BOX2< Vec >::Compute(), BOX2< Vec >::Inflate(), m_bbox, m_points, and m_width.
Referenced by SHAPE_POLY_SET::BuildBBoxCaches(), and ZONE_FILLER::buildThermalSpokes().
|
inlinevirtualinherited |
Reimplemented in SHAPE_POLY_SET, and SHAPE_COMPOUND.
|
inlinevirtualinherited |
Reimplemented in SHAPE_POLY_SET, and SHAPE_COMPOUND.
Definition at line 111 of file shape.h.
Referenced by SHAPE_COMPOUND::AddShape(), and ROUTER_PREVIEW_ITEM::ViewDraw().
|
inlineoverridevirtual |
Implements SHAPE_LINE_CHAIN_BASE.
Definition at line 758 of file shape_line_chain.h.
References CPoint().
Referenced by BuildFootprintPolygonOutlines().
|
inlineoverridevirtual |
Implements SHAPE_LINE_CHAIN_BASE.
Definition at line 760 of file shape_line_chain.h.
References PointCount().
|
inlineoverridevirtual |
Implements SHAPE_LINE_CHAIN_BASE.
Definition at line 759 of file shape_line_chain.h.
References CSegment().
Referenced by TransformArcToPolygon().
|
inlineoverridevirtual |
Implements SHAPE_LINE_CHAIN_BASE.
Definition at line 761 of file shape_line_chain.h.
References SegmentCount().
Referenced by DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run(), and TransformArcToPolygon().
|
inlinevirtualinherited |
Reimplemented in SHAPE_POLY_SET, and SHAPE_COMPOUND.
Definition at line 104 of file shape.h.
Referenced by SHAPE_COMPOUND::AddShape(), and ROUTER_PREVIEW_ITEM::ViewDraw().
void SHAPE_LINE_CHAIN::Insert | ( | size_t | aVertex, |
const VECTOR2I & | aP | ||
) |
Definition at line 632 of file shape_line_chain.cpp.
References convertArc(), m_points, m_shapes, and SHAPE_IS_PT.
Referenced by PNS::LINE::dragSegment45().
void SHAPE_LINE_CHAIN::Insert | ( | size_t | aVertex, |
const SHAPE_ARC & | aArc | ||
) |
Step 1: Find the position for the new arc in the existing arc vector
Step 2: Add the arc polyline points to the chain
Step 3: Add the vector of indices to the shape vector
Definition at line 644 of file shape_line_chain.cpp.
References convertArc(), SHAPE_ARC::ConvertToPolyline(), m_arcs, m_points, m_shapes, and SHAPE_IS_PT.
int SHAPE_LINE_CHAIN::Intersect | ( | const SEG & | aSeg, |
INTERSECTIONS & | aIp | ||
) | const |
Function Intersect()
Finds all intersection points between our line chain and the segment aSeg.
aSeg | the segment chain to find intersections with |
aIp | reference to a vector to store found intersections. Intersection points are sorted with increasing distances from point aSeg.a. |
Definition at line 689 of file shape_line_chain.cpp.
References SEG::A, CSegment(), SEG::Intersect(), SHAPE_LINE_CHAIN::INTERSECTION::our, SHAPE_LINE_CHAIN::INTERSECTION::p, SegmentCount(), and SHAPE_LINE_CHAIN::INTERSECTION::their.
Referenced by PNS::OPTIMIZER::customBreakouts(), CN_ITEM::GetAnchor(), PNS::LINE_PLACER::handleSelfIntersections(), Intersects(), CADSTAR_SCH_ARCHIVE_LOADER::loadNets(), PNS::NODE::NearestObstacle(), POLYGON_GEOM_MANAGER::updateLeaderPoints(), and PNS::LINE::Walkaround().
int SHAPE_LINE_CHAIN::Intersect | ( | const SHAPE_LINE_CHAIN & | aChain, |
INTERSECTIONS & | aIp | ||
) | const |
Function Intersect()
Finds all intersection points between our line chain and the line chain aChain.
aChain | the line chain to find intersections with |
aIp | reference to a vector to store found intersections. Intersection points are sorted with increasing path lengths from the starting point of aChain. |
Definition at line 730 of file shape_line_chain.cpp.
References SEG::A, addIntersection(), SEG::B, BBox(), SEG::Collinear(), SEG::Contains(), CSegment(), SEG::Intersect(), BOX2< Vec >::Intersects(), SHAPE_LINE_CHAIN::INTERSECTION::our, SHAPE_LINE_CHAIN::INTERSECTION::p, PointCount(), SegmentCount(), and SHAPE_LINE_CHAIN::INTERSECTION::their.
bool SHAPE_LINE_CHAIN::Intersects | ( | const SHAPE_LINE_CHAIN & | aChain | ) | const |
Definition at line 1187 of file shape_line_chain.cpp.
References dummy(), and Intersect().
Referenced by PNS::DIFF_PAIR::BuildInitial().
|
inline |
A segment is part of an arc except in the special case of two arcs next to each other but without a shared vertex. Here there is a segment between the end of the first arc and the start of the second arc.
Definition at line 746 of file shape_line_chain.h.
References m_shapes, and SHAPE_IS_PT.
Referenced by PNS::LINE::Is45Degree(), and PNS::OPTIMIZER::mergeStep().
|
inlineoverridevirtual |
Function IsClosed()
Implements SHAPE_LINE_CHAIN_BASE.
Definition at line 197 of file shape_line_chain.h.
References m_closed.
Referenced by SHAPE_POLY_SET::AddOutline(), ZONE::AddPolygon(), BuildFootprintPolygonOutlines(), KIGFX::CAIRO_GAL_BASE::drawPoly(), KIGFX::OPENGL_GAL::DrawPolyline(), PLOTTER::PlotPoly(), PNS::pointInside2(), and SelfIntersecting().
|
inlineinherited |
Function IsNull()
Returns true if the shape is a null shape.
true | if null :-) |
Definition at line 157 of file shape.h.
References SHAPE_BASE::m_type, and SH_NULL.
|
inlineoverridevirtual |
long long int SHAPE_LINE_CHAIN::Length | ( | ) | const |
Function Length()
Returns length of the line chain in Euclidean metric.
Definition at line 232 of file shape_line_chain.cpp.
References CSegment(), SEG::Length(), and SegmentCount().
Referenced by PNS::COST_ESTIMATOR::Add(), PNS::LINE::dragSegment45(), PNS::DRAGGER::dragWalkaround(), PNS::OPTIMIZER::fanoutCleanup(), PNS::MEANDER_SHAPE::MaxTunableLength(), PNS::SHOVE::onCollidingArc(), PNS::SHOVE::onCollidingSegment(), PNS::COST_ESTIMATOR::Remove(), PNS::COST_ESTIMATOR::Replace(), PNS::LINE_PLACER::rhWalkOnly(), PNS::WALKAROUND::Route(), PNS::SHOVE::shoveLineFromLoneVia(), PNS::WALKAROUND::singleStep(), PNS::DIFF_PAIR::Skew(), and PNS::DIFF_PAIR::TotalLength().
void SHAPE_LINE_CHAIN::Mirror | ( | bool | aX = true , |
bool | aY = false , |
||
const VECTOR2I & | aRef = { 0, 0 } |
||
) |
Mirrors the line points about y or x (or both)
aX | If true, mirror about the y axis (flip X coordinate) |
aY | If true, mirror about the x axis (flip Y coordinate) |
aRef | sets the reference point about which to mirror |
Definition at line 243 of file shape_line_chain.cpp.
References m_arcs, m_points, VECTOR2< T >::x, and VECTOR2< T >::y.
|
inlineoverridevirtual |
Implements SHAPE.
Definition at line 694 of file shape_line_chain.h.
References m_arcs, and m_points.
Referenced by ZONE_FILLER::addHatchFillTypeOnZone(), PAD::BuildEffectiveShapes(), ZONE_FILLER::buildThermalSpokes(), PLACEFILE_GERBER_WRITER::CreatePlaceFile(), PCB_SELECTION_TOOL::hitTestDistance(), PCB_SHAPE::MakeEffectiveShapes(), and SHAPE_SIMPLE::Move().
const VECTOR2I SHAPE_LINE_CHAIN::NearestPoint | ( | const VECTOR2I & | aP, |
bool | aAllowInternalShapePoints = true |
||
) | const |
Finds a point on the line chain that is closest to point aP.
aP | is the point to find |
aAllowInternalShapePoints | if false will not return points internal to an arc (i.e. only the arc endpoints are possible candidates) |
Definition at line 1054 of file shape_line_chain.cpp.
References CSegment(), SEG::Distance(), m_points, m_shapes, SEG::NearestPoint(), and SegmentCount().
Referenced by GRID_HELPER::computeAnchors(), PNS::MEANDER_PLACER_BASE::cutTunedLine(), PNS::DRAGGER::dragShove(), CADSTAR_SCH_ARCHIVE_LOADER::loadBusses(), PNS::MoveDiagonal(), and PNS::DRAGGER::optimizeAndUpdateDraggedLine().
Finds a point on the line chain that is closest to the line defined by the points of segment aSeg, also returns the distance.
aSeg | Segment defining the line. |
dist | reference receiving the distance to the nearest point. |
Definition at line 1100 of file shape_line_chain.cpp.
References CPoint(), SEG::LineDistance(), and PointCount().
int SHAPE_LINE_CHAIN::NearestSegment | ( | const VECTOR2I & | aP | ) | const |
Find the segment nearest the given point.
aP | point to compare with |
Definition at line 1120 of file shape_line_chain.cpp.
References CSegment(), SEG::Distance(), and SegmentCount().
Referenced by SCH_SHEET_PIN::ConstrainOnEdge().
|
inherited |
Definition at line 705 of file wrlfacet.cpp.
References SHAPE::facets.
Referenced by WRL1FACESET::TranslateToSG(), X3DIFACESET::TranslateToSG(), and WRL2FACESET::TranslateToSG().
int SHAPE_LINE_CHAIN::NextShape | ( | int | aPointIndex, |
bool | aForwards = true |
||
) | const |
Returns the vertex index of the next shape in the chain, or -1 if aPoint is in the last shape If aPoint is the start of a segment, this will be ( aPoint + 1 ).
If aPoint is part of an arc, this will be the index of the start of the next shape after the arc, in other words, the last point of the arc.
aPointIndex | is a vertex in the chain |
aForwards | is true if the next shape is desired, false for previous shape |
Definition at line 471 of file shape_line_chain.cpp.
References m_shapes, PointCount(), and SHAPE_IS_PT.
Referenced by PrevShape().
|
inline |
Definition at line 678 of file shape_line_chain.h.
References CPoint(), and PointCount().
|
default |
|
overridevirtual |
Reimplemented from SHAPE.
Definition at line 1199 of file shape_line_chain.cpp.
References PNS::angle(), m_arcs, m_closed, m_points, m_shapes, VECTOR2< T >::x, and VECTOR2< T >::y.
int SHAPE_LINE_CHAIN::PathLength | ( | const VECTOR2I & | aP | ) | const |
Function PathLength()
Computes the walk path length from the beginning of the line chain and the point aP belonging to our line.
Definition at line 776 of file shape_line_chain.cpp.
References SEG::A, CSegment(), SEG::Distance(), EuclideanNorm(), SEG::Length(), and SegmentCount().
Referenced by PNS::NODE::NearestObstacle(), and PNS::LINE::Walkaround().
const VECTOR2I SHAPE_LINE_CHAIN::PointAlong | ( | int | aPathLength | ) | const |
Definition at line 1247 of file shape_line_chain.cpp.
References SEG::A, SEG::B, CPoint(), CSegment(), SEG::Length(), VECTOR2< T >::Resize(), and SegmentCount().
|
inline |
Function PointCount()
Returns the number of points (vertices) in this line chain
Definition at line 248 of file shape_line_chain.h.
References m_points.
Referenced by POLYGON_GEOM_MANAGER::AddPoint(), SHAPE_LINE_CHAIN::POINT_INSIDE_TRACKER::AddPolyline(), BOARD_ADAPTER::addSolidAreasShapes(), TRIANGLE_DISPLAY_LIST::AddToMiddleContourns(), CN_ZONE_LAYER::AnchorCount(), Append(), PNS::LINE::AppendVia(), ArePolylineEndPointsNearCircle(), ArePolylineMidPointsNearCircle(), BOOST_AUTO_TEST_CASE(), BuildConvexHull(), PAD::BuildEffectivePolygon(), PAD::BuildEffectiveShapes(), BOARD_ADAPTER::buildPadOutlineAsPolygon(), BOARD_ADAPTER::buildPadOutlineAsSegments(), PCB_SHAPE::BuildPolyPointsList(), PNS::LINE::ChangedArea(), PNS::KEEP_TOPOLOGY_CONSTRAINT::Check(), CheckClearance(), CN_VISITOR::checkZoneZoneConnection(), CLastPoint(), PNS::LINE::ClipVertexRange(), convertToClipper(), PNS::coupledBypass(), CPoint(), PolygonTriangulation::createList(), CreatePadsShapesSection(), PLACEFILE_GERBER_WRITER::CreatePlaceFile(), POLYGON_GEOM_MANAGER::DeleteLastCorner(), DIALOG_PAD_PRIMITIVE_POLY_PROPS::doValidate(), PNS::LINE::dragSegment45(), KIGFX::GERBVIEW_PAINTER::draw(), APERTURE_MACRO::DrawApertureMacroShape(), KIGFX::CAIRO_GAL_BASE::drawPoly(), KIGFX::OPENGL_GAL::DrawPolygon(), KIGFX::OPENGL_GAL::DrawPolyline(), KIGFX::PREVIEW::POLYGON_ITEM::drawPreviewShape(), export_vrml_board(), export_vrml_padshape(), export_vrml_polygon(), export_vrml_zones(), DSN::SPECCTRA_DB::fillBOUNDARY(), AR_AUTOPLACER::fillMatrix(), Find(), PNS::LINE_PLACER::FixRoute(), GERBER_PLOTTER::FlashPadChamferRoundRect(), PSLIKE_PLOTTER::FlashPadCustom(), DXF_PLOTTER::FlashPadCustom(), HPGL_PLOTTER::FlashPadCustom(), GERBER_PLOTTER::FlashPadCustom(), PSLIKE_PLOTTER::FlashPadRoundRect(), DXF_PLOTTER::FlashPadRoundRect(), HPGL_PLOTTER::FlashPadRoundRect(), GERBER_PLOTTER::FlashPadRoundRect(), PCB_IO::format(), Format(), PNS::MEANDER_SHAPE::genMeanderShape(), CADSTAR_PCB_ARCHIVE_LOADER::getLineChainFromDrawsegments(), SHAPE_SIMPLE::GetPointCount(), GetPointCount(), CADSTAR_PCB_ARCHIVE_LOADER::getPolySetFromCadstarShape(), PNS::POSTURE_SOLVER::GetPosture(), SHAPE_POLY_SET::GetRelativeIndices(), PNS::LINE_PLACER::handlePullback(), PNS::LINE_PLACER::handleSelfIntersections(), WS_DRAW_ITEM_POLYPOLYGONS::HitTest(), Intersect(), POLYGON_GEOM_MANAGER::IsPolygonInProgress(), PCB_SHAPE::IsPolyShapeValid(), POLYGON_GEOM_MANAGER::IsSelfIntersecting(), DSN::SPECCTRA_DB::makePADSTACK(), PNS::LINE_PLACER::mergeHead(), PNS::OPTIMIZER::mergeObtuse(), NearestPoint(), POLYGON_GEOM_MANAGER::NewPointClosesOutline(), NextShape(), operator!=(), BOOST_TEST_PRINT_NAMESPACE_OPEN::print_log_value< SHAPE_LINE_CHAIN >::operator()(), PNS::LINE_PLACER::optimizeTailHeadTransition(), BITMAPCONV_INFO::outputOnePolygon(), ALTIUM_PCB::ParsePolygons6Data(), ALTIUM_PCB::ParseShapeBasedRegions6Data(), BRDITEMS_PLOTTER::PlotFilledAreas(), PlotLayerOutlines(), DXF_PLOTTER::PlotPoly(), PLOTTER::PlotPoly(), PlotSolderMaskLayer(), PlotWorkSheet(), SHAPE_SIMPLE::PointCount(), PNS::LINE::PointCount(), PNS::pointInside2(), polygon_Convert(), GERBER_DRAW_ITEM::PrintGerberPoly(), WS_DRAW_ITEM_POLYPOLYGONS::PrintWsItem(), Remove(), RemoveShape(), Replace(), PNS::OPTIMIZER::runSmartPads(), SetPoint(), KIGFX::PREVIEW::POLYGON_ITEM::SetPoints(), PNS::shovedArea(), PNS::SHOVE::shoveLineFromLoneVia(), PNS::SHOVE::shoveLineToHullSet(), Simplify(), Slice(), Split(), DXF_PLOTTER::ThickSegment(), POLYGON_GEOM_MANAGER::updateLeaderPoints(), PNS::LINE::Walkaround(), HYPERLYNX_EXPORTER::writeNetObjects(), GBR_TO_PCB_EXPORTER::writePcbPolygon(), and GBR_TO_PCB_EXPORTER::writePcbZoneItem().
|
inherited |
Function PointInside()
Checks if point aP lies inside a polygon (any type) defined by the line chain. For closed shapes only.
aPt | point to check |
aUseBBoxCache | gives better peformance if the bounding box caches have been generated. |
To check for interior points, we draw a line in the positive x direction from the point. If it intersects an even number of segments, the point is outside the line chain (it had to first enter and then exit). Otherwise, it is inside the chain.
Note: slope might be denormal here in the case of a horizontal line but we require our y to move from above to below the point (or vice versa)
Note: we open-code CPoint() here so that we don't end up calculating the size of the vector number-of-points times. This has a non-trivial impact on zone fill times.
Definition at line 798 of file shape_line_chain.cpp.
References SHAPE_LINE_CHAIN_BASE::GetPoint(), SHAPE_LINE_CHAIN_BASE::GetPointCount(), SHAPE_LINE_CHAIN_BASE::IsClosed(), SHAPE_LINE_CHAIN_BASE::PointOnEdge(), rescale(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by Collide(), SHAPE_LINE_CHAIN_BASE::Collide(), POLY_GRID_PARTITION::containsPoint(), SHAPE_POLY_SET::containsSingle(), LIB_POLYLINE::HitTest(), ZONE::HitTestCutout(), MARKER_BASE::HitTestMarker(), SHAPE_LINE_CHAIN_BASE::SquaredDistance(), and PNS::LINE::Walkaround().
|
inherited |
Function PointOnEdge()
Checks if point aP lies on an edge or vertex of the line chain.
aP | point to check |
Definition at line 852 of file shape_line_chain.cpp.
References SHAPE_LINE_CHAIN_BASE::EdgeContainingPoint().
Referenced by LIB_POLYLINE::HitTest(), and SHAPE_LINE_CHAIN_BASE::PointInside().
|
inline |
Definition at line 302 of file shape_line_chain.h.
References NextShape().
Referenced by PNS::LINE_PLACER::handlePullback().
void SHAPE_LINE_CHAIN::Remove | ( | int | aStartIndex, |
int | aEndIndex | ||
) |
Function Remove()
Removes the range of points [start_index, end_index] from the line chain.
aStartIndex | start of the point range to be replaced (inclusive) |
aEndIndex | end of the point range to be replaced (inclusive) |
Definition at line 315 of file shape_line_chain.cpp.
References convertArc(), m_points, m_shapes, PointCount(), and SHAPE_IS_PT.
Referenced by POLYGON_GEOM_MANAGER::AddPoint(), PNS::LINE_PLACER::buildInitialLine(), PNS::LINE::ClipToNearestObstacle(), POLYGON_GEOM_MANAGER::DeleteLastCorner(), PNS::DIFF_PAIR_PLACER::FixRoute(), PNS::LINE_PLACER::handleSelfIntersections(), PNS::LINE_PLACER::mergeHead(), PNS::LINE_PLACER::reduceTail(), Remove(), RemoveShape(), Replace(), and PNS::WALKAROUND::Route().
|
inline |
Function Remove() removes the aIndex-th point from the line chain.
aIndex | is the index of the point to be removed. |
Definition at line 508 of file shape_line_chain.h.
References Remove().
void SHAPE_LINE_CHAIN::RemoveShape | ( | int | aPointIndex | ) |
Removes the shape at the given index from the line chain.
If the given index is inside an arc, the entire arc will be removed. Otherwise this is equivalent to Remove( aPointIndex ).
aPointIndex | is the index of the point to remove |
Definition at line 503 of file shape_line_chain.cpp.
References m_shapes, PointCount(), Remove(), and SHAPE_IS_PT.
Referenced by PNS::LINE_PLACER::handlePullback().
void SHAPE_LINE_CHAIN::Replace | ( | int | aStartIndex, |
int | aEndIndex, | ||
const VECTOR2I & | aP | ||
) |
Function Replace()
Replaces points with indices in range [start_index, end_index] with a single point aP.
aStartIndex | start of the point range to be replaced (inclusive) |
aEndIndex | end of the point range to be replaced (inclusive) |
aP | replacement point |
Definition at line 259 of file shape_line_chain.cpp.
References convertArc(), m_points, m_shapes, PointCount(), and SHAPE_IS_PT.
Referenced by PNS::coupledBypass(), PNS::LINE::dragSegment45(), CADSTAR_SCH_ARCHIVE_LOADER::loadNets(), PNS::OPTIMIZER::mergeColinear(), PNS::OPTIMIZER::mergeDpStep(), PNS::OPTIMIZER::mergeObtuse(), PNS::OPTIMIZER::mergeStep(), PNS::LINE_PLACER::optimizeTailHeadTransition(), and PNS::Tighten().
void SHAPE_LINE_CHAIN::Replace | ( | int | aStartIndex, |
int | aEndIndex, | ||
const SHAPE_LINE_CHAIN & | aLine | ||
) |
Function Replace()
Replaces points with indices in range [start_index, end_index] with the points from line chain aLine.
aStartIndex | start of the point range to be replaced (inclusive) |
aEndIndex | end of the point range to be replaced (inclusive) |
aLine | replacement line chain. |
Definition at line 290 of file shape_line_chain.cpp.
References m_arcs, m_points, m_shapes, PointCount(), and Remove().
const SHAPE_LINE_CHAIN SHAPE_LINE_CHAIN::Reverse | ( | ) | const |
Function Reverse()
Reverses point order in the line chain.
Definition at line 209 of file shape_line_chain.cpp.
References m_arcs, m_closed, m_points, m_shapes, SHAPE_ARC::Reverse(), and SHAPE_IS_PT.
Referenced by PNS::ArcHull(), PNS::KEEP_TOPOLOGY_CONSTRAINT::Check(), PNS::SHOVE::checkShoveDirection(), PNS::coupledBypass(), PNS::MEANDER_PLACER_BASE::cutTunedLine(), PNS::LINE::dragCorner45(), PNS::POSTURE_SOLVER::GetPosture(), CADSTAR_SCH_ARCHIVE_LOADER::loadNets(), PNS::DP_GATEWAY::Reverse(), PNS::LINE::Reverse(), PNS::SegmentHull(), and PNS::OPTIMIZER::smartPadsSingle().
|
overridevirtual |
Function Rotate rotates all vertices by a given angle.
aCenter | is the rotation center |
aAngle | rotation angle in radians |
Implements SHAPE.
Definition at line 141 of file shape_line_chain.cpp.
References m_arcs, m_points, and VECTOR2< T >::Rotate().
Referenced by PAD::BuildEffectiveShapes(), ZONE_FILLER::buildThermalSpokes(), PLACEFILE_GERBER_WRITER::CreatePlaceFile(), and PCB_SHAPE::MakeEffectiveShapes().
|
inline |
Function Segment()
Returns a copy of the aIndex-th segment in the line chain.
aIndex | index of the segment in the line chain. Negative values are counted from the end (i.e. -1 means the last segment in the line chain) |
Definition at line 261 of file shape_line_chain.h.
References m_closed, m_points, and SegmentCount().
Referenced by POLY_GRID_PARTITION::build(), BuildFootprintPolygonOutlines(), POLY_GRID_PARTITION::checkClearance(), PNS::DIFF_PAIR::CoupledSegmentPairs(), KIGFX::PCB_PAINTER::draw(), findEndSegments(), CADSTAR_SCH_ARCHIVE_LOADER::loadShapeVertices(), PCB_SHAPE::MakeEffectiveShapes(), PNS::WALKAROUND::Route(), and unfracture().
|
inline |
Function SegmentCount()
Returns number of segments in this line chain.
Definition at line 226 of file shape_line_chain.h.
References m_closed, and m_points.
Referenced by PNS::POSTURE_SOLVER::AddTrailPoint(), POLY_GRID_PARTITION::build(), BuildFootprintPolygonOutlines(), PNS::LINE_PLACER::buildInitialLine(), PNS::PRESERVE_VERTEX_CONSTRAINT::Check(), CheckClearance(), PNS::NODE::CheckColliding(), PNS::DIFF_PAIR::CheckConnectionAngle(), PNS::checkGap(), PNS::MEANDERED_LINE::CheckSelfIntersections(), PNS::closestProjectedPoint(), GRID_HELPER::computeAnchors(), PNS::COST_ESTIMATOR::CornerCost(), PNS::LINE::CountCorners(), PNS::DIFF_PAIR::CoupledLength(), PNS::DIFF_PAIR::CoupledSegmentPairs(), CSegment(), PNS::LINE::dragCorner45(), PNS::dragCornerInternal(), PNS::LINE::dragSegment45(), KIGFX::PCB_PAINTER::draw(), KIGFX::OPENGL_GAL::DrawPolygon(), PNS::DIFF_PAIR::Empty(), PNS::findCoupledVertices(), findEndSegments(), FindSegment(), PNS::DIFF_PAIR_PLACER::FixRoute(), PNS::LINE_PLACER::FixRoute(), PCB_SHAPE::GetLength(), SHAPE_SIMPLE::GetSegmentCount(), GetSegmentCount(), PNS::LINE_PLACER::handlePullback(), PNS::DP_MEANDER_PLACER::HasPlacedAnything(), PNS::DIFF_PAIR_PLACER::HasPlacedAnything(), Intersect(), PNS::LINE::Is45Degree(), Length(), CADSTAR_SCH_ARCHIVE_LOADER::loadShapeVertices(), PCB_SHAPE::MakeEffectiveShapes(), PNS::OPTIMIZER::mergeColinear(), PNS::OPTIMIZER::mergeDpSegments(), PNS::OPTIMIZER::mergeDpStep(), PNS::OPTIMIZER::mergeFull(), PNS::OPTIMIZER::mergeObtuse(), PNS::OPTIMIZER::mergeStep(), PNS::NODE::NearestObstacle(), NearestPoint(), NearestSegment(), PathLength(), PointAlong(), PNS::pointInside2(), PNS::LINE_PLACER::reduceTail(), PNS::WALKAROUND::Route(), Segment(), PNS::LINE::SegmentCount(), SelfIntersecting(), PNS::OPTIMIZER::smartPadsSingle(), PNS::LINE::snapDraggedCorner(), PNS::LINE::snapToNeighbourSegments(), Split(), POLYGON_GEOM_MANAGER::updateLeaderPoints(), PNS::LINE::Walkaround(), and HYPERLYNX_EXPORTER::writeBoardInfo().
const OPT< SHAPE_LINE_CHAIN::INTERSECTION > SHAPE_LINE_CHAIN::SelfIntersecting | ( | ) | const |
Function SelfIntersecting()
Checks if the line chain is self-intersecting.
Definition at line 906 of file shape_line_chain.cpp.
References SEG::A, SEG::B, CSegment(), SEG::Intersect(), IsClosed(), SHAPE_LINE_CHAIN::INTERSECTION::our, SHAPE_LINE_CHAIN::INTERSECTION::p, SegmentCount(), and SHAPE_LINE_CHAIN::INTERSECTION::their.
Referenced by PNS::DIFF_PAIR::BuildInitial(), PNS::clipToLoopStart(), DIALOG_PAD_PRIMITIVE_POLY_PROPS::doValidate(), and PNS::SHOVE::shoveLineToHullSet().
|
inline |
Function SetClosed()
Marks the line chain as closed (i.e. with a segment connecting the last point with the first point).
aClosed | whether the line chain is to be closed or not. |
Definition at line 187 of file shape_line_chain.h.
References m_closed.
Referenced by ZONE_FILLER::addHatchFillTypeOnZone(), ZONE::AddPolygon(), PNS::ArcHull(), POLY_GRID_PARTITION::build(), buildBoardBoundingBoxPoly(), BuildFootprintPolygonOutlines(), KI_TEST::BuildRectChain(), ZONE_FILLER::buildThermalSpokes(), SHAPE_POLY_SET::chamferFilletPolygon(), PNS::KEEP_TOPOLOGY_CONSTRAINT::Check(), CN_ZONE_LAYER::CN_ZONE_LAYER(), KI_TEST::CommonTestData::CommonTestData(), GRID_HELPER::computeAnchors(), PNS::ConvexHull(), CovertPolygonToBlocks(), PLACEFILE_GERBER_WRITER::CreatePlaceFile(), KIGFX::GERBVIEW_PAINTER::draw(), SHAPE_POLY_SET::fractureSingle(), CADSTAR_PCB_ARCHIVE_LOADER::getLineChainFromDrawsegments(), PNS::POSTURE_SOLVER::GetPosture(), HelperShapeLineChainFromAltiumVertices(), LIB_POLYLINE::HitTest(), IteratorFixture::IteratorFixture(), CONVERT_TOOL::makePolysFromRects(), CONVERT_TOOL::makePolysFromSegs(), GEOM_TEST::MakeSquarePolyLine(), SHAPE_POLY_SET::NewHole(), SHAPE_POLY_SET::NewOutline(), PNS::OctagonalHull(), SHAPE_RECT::Outline(), EAGLE_PLUGIN::packagePolygon(), SHAPE_POLY_SET::Parse(), ALTIUM_PCB::ParseRegions6Data(), BRDITEMS_PLOTTER::PlotFootprintGraphicItem(), polygonArea(), CONVERT_TOOL::PolyToLines(), RENDER_3D_LEGACY::reload(), PNS::SegmentHull(), SHAPE_SIMPLE::SHAPE_SIMPLE(), MARKER_BASE::ShapeToPolygon(), TestConcaveSquareFillet(), TransformCircleToPolygon(), TransformRoundRectToPolygon(), unfracture(), SHAPE_POLY_SET::unfractureSingle(), and PNS::LINE::Walkaround().
|
inline |
Accessor Function to move a point to a specific location.
aIndex | Index (wrapping) of the point to move |
aPos | New absolute location of the point |
Definition at line 312 of file shape_line_chain.h.
References convertArc(), m_points, m_shapes, PointCount(), and SHAPE_IS_PT.
Referenced by PNS::LINE_PLACER::buildInitialLine(), PNS::LINE::dragCornerFree(), and PNS::MEANDER_SHAPE::genMeanderShape().
|
inline |
Sets the width of all segments in the chain.
aWidth | width in internal units |
Definition at line 206 of file shape_line_chain.h.
References m_width.
Referenced by PNS::LINE::SetShape(), PNS::LINE::SetWidth(), and PNS::DIFF_PAIR::SetWidth().
int SHAPE_LINE_CHAIN::ShapeCount | ( | ) | const |
Returns the number of shapes (line segments or arcs) in this line chain.
This is kind of like SegmentCount() but will only count arcs as 1 segment
Definition at line 430 of file shape_line_chain.cpp.
References m_points, m_shapes, and SHAPE_IS_PT.
Referenced by PNS::LINE_PLACER::mergeHead(), PNS::LINE_PLACER::optimizeTailHeadTransition(), and PNS::LINE::ShapeCount().
SHAPE_LINE_CHAIN & SHAPE_LINE_CHAIN::Simplify | ( | bool | aRemoveColinear = true | ) |
Function Simplify()
Simplifies the line chain by removing colinear adjacent segments and duplicate vertices.
aRemoveColinear | controsl the removal of colinear adjacent segments |
Definition at line 954 of file shape_line_chain.cpp.
References CPoint(), m_arcs, m_points, m_shapes, PointCount(), and SHAPE_IS_PT.
Referenced by PNS::POSTURE_SOLVER::AddTrailPoint(), PNS::NODE::AssembleLine(), PNS::DIFF_PAIR_PLACER::attemptWalk(), DIRECTION_45::BuildInitialTrace(), PNS::LINE::ChangedArea(), CN_ZONE_LAYER::CN_ZONE_LAYER(), CompareGeometry(), PNS::DIFF_PAIR::CoupledSegmentPairs(), PNS::MEANDER_PLACER_BASE::cutTunedLine(), PNS::MEANDER_PLACER::doMove(), DIALOG_PAD_PRIMITIVE_POLY_PROPS::doValidate(), PNS::LINE::dragCorner45(), PNS::LINE::dragCornerFree(), PNS::LINE::dragSegment45(), PNS::POSTURE_SOLVER::GetPosture(), PNS::OPTIMIZER::mergeDpStep(), PNS::OPTIMIZER::mergeFull(), PNS::LINE_PLACER::mergeHead(), PNS::OPTIMIZER::mergeStep(), PNS::DP_MEANDER_PLACER::Move(), PNS::SHOVE::onCollidingSolid(), PNS::LINE_PLACER::optimizeTailHeadTransition(), PNS::LINE_PLACER::rhShoveOnly(), PNS::WALKAROUND::Route(), PNS::OPTIMIZER::runSmartPads(), PNS::SHOVE::shoveLineToHullSet(), PNS::TOPOLOGY::SimplifyLine(), PNS::LINE_PLACER::simplifyNewLine(), PNS::OPTIMIZER::smartPadsSingle(), PNS::Tighten(), PNS::LINE_PLACER::Trace(), and PNS::LINE::Walkaround().
const SHAPE_LINE_CHAIN SHAPE_LINE_CHAIN::Slice | ( | int | aStartIndex, |
int | aEndIndex = -1 |
||
) | const |
Function Slice()
Returns a subset of this line chain containing the [start_index, end_index] range of points.
aStartIndex | start of the point range to be returned (inclusive) |
aEndIndex | end of the point range to be returned (inclusive) |
Definition at line 528 of file shape_line_chain.cpp.
References Append(), m_arcs, m_points, m_shapes, PointCount(), and SHAPE_IS_PT.
Referenced by PNS::POSTURE_SOLVER::AddTrailPoint(), PNS::KEEP_TOPOLOGY_CONSTRAINT::Check(), PNS::clipToLoopStart(), PNS::LINE::ClipVertexRange(), PNS::MEANDER_PLACER_BASE::cutTunedLine(), PNS::LINE::dragCorner45(), PNS::dragCornerInternal(), PNS::LINE_PLACER::optimizeTailHeadTransition(), PNS::LINE_PLACER::rhWalkOnly(), PNS::Tighten(), and PNS::LINE::Walkaround().
int SHAPE_LINE_CHAIN::Split | ( | const VECTOR2I & | aP | ) |
Function Split()
Inserts the point aP belonging to one of the our segments, splitting the adjacent segment in two.
aP | the point to be inserted |
Definition at line 366 of file shape_line_chain.cpp.
References SEG::A, SEG::B, CSegment(), SEG::Distance(), Find(), m_points, m_shapes, PointCount(), SegmentCount(), and SHAPE_IS_PT.
Referenced by PNS::clipToLoopStart(), PNS::LINE::ClipToNearestObstacle(), PNS::MEANDER_PLACER_BASE::cutTunedLine(), PNS::LINE_PLACER::rhWalkOnly(), and PNS::LINE::Walkaround().
|
inherited |
Definition at line 352 of file shape_line_chain.cpp.
References VECTOR2< T >::ECOORD_MAX, SHAPE_LINE_CHAIN_BASE::GetSegment(), SHAPE_LINE_CHAIN_BASE::GetSegmentCount(), SHAPE_LINE_CHAIN_BASE::IsClosed(), SHAPE_LINE_CHAIN_BASE::PointInside(), and SEG::SquaredDistance().
Referenced by Distance().
|
inlineinherited |
Function Type()
Returns the type of the shape.
the | type |
Definition at line 99 of file shape.h.
References SHAPE_BASE::m_type.
Referenced by PNS::DP_GATEWAYS::BuildFromPrimitivePair(), PNS::buildHullForPrimitiveShape(), Collide(), SHAPE_POLY_SET::Collide(), collideShapes(), collideSingleShapes(), PNS::OPTIMIZER::computeBreakouts(), ROUTER_PREVIEW_ITEM::drawShape(), PNS::SOLID::HoleHull(), PNS::SOLID::Hull(), and SHAPE_FILE_IO::Write().
|
inline |
Gets the current width of the segments in the chain.
Definition at line 215 of file shape_line_chain.h.
References m_width.
Referenced by ROUTER_PREVIEW_ITEM::drawShape().
|
private |
Definition at line 777 of file shape_line_chain.h.
Referenced by Append(), Arc(), ArcCount(), CArcs(), Clear(), convertArc(), Insert(), Mirror(), Move(), Parse(), Replace(), Reverse(), Rotate(), SHAPE_LINE_CHAIN(), Simplify(), and Slice().
|
private |
cached bounding box
Definition at line 790 of file shape_line_chain.h.
Referenced by Append(), BBoxFromCache(), and GenerateBBoxCache().
|
private |
is the line chain closed?
Definition at line 780 of file shape_line_chain.h.
Referenced by Area(), Clear(), CSegment(), Format(), IsClosed(), Parse(), Reverse(), Segment(), SegmentCount(), and SetClosed().
|
private |
array of vertices
Definition at line 768 of file shape_line_chain.h.
Referenced by Append(), Area(), BBox(), CheckClearance(), CLastPoint(), Clear(), CompareGeometry(), CPoint(), CPoints(), CSegment(), Format(), GenerateBBoxCache(), Insert(), Mirror(), Move(), NearestPoint(), Parse(), PointCount(), Remove(), Replace(), Reverse(), Rotate(), Segment(), SegmentCount(), SetPoint(), SHAPE_LINE_CHAIN(), ShapeCount(), Simplify(), Slice(), and Split().
|
private |
Array of indices that refer to the index of the shape if the point is part of a larger shape, e.g.
arc or spline. If the value is -1, the point is just a point.
Definition at line 775 of file shape_line_chain.h.
Referenced by Append(), ArcIndex(), Clear(), convertArc(), CShapes(), Insert(), isArc(), NearestPoint(), NextShape(), Parse(), Remove(), RemoveShape(), Replace(), Reverse(), SetPoint(), SHAPE_LINE_CHAIN(), ShapeCount(), Simplify(), Slice(), and Split().
|
protectedinherited |
type of our shape
Definition at line 115 of file shape.h.
Referenced by SHAPE::IsNull(), and SHAPE_BASE::Type().
|
private |
Width of the segments (for BBox calculations in RTree) TODO Adjust usage of SHAPE_LINE_CHAIN to account for where we need a width and where not Alternatively, we could split the class into a LINE_CHAIN (no width) and SHAPE_LINE_CHAIN that derives from SHAPE as well that does have a width.
Not sure yet on the correct path. TODO Note that we also have SHAPE_SIMPLE which is a closed, filled SHAPE_LINE_CHAIN.
Definition at line 787 of file shape_line_chain.h.
Referenced by BBox(), GenerateBBoxCache(), SetWidth(), and Width().
|
staticprivate |
Definition at line 765 of file shape_line_chain.h.
Referenced by Append(), ArcIndex(), convertArc(), Insert(), isArc(), NextShape(), Remove(), RemoveShape(), Replace(), Reverse(), SetPoint(), SHAPE_LINE_CHAIN(), ShapeCount(), Simplify(), Slice(), and Split().