PCB Environment 2
Loading...
Searching...
No Matches
Path Class Reference

Public Member Functions

const Point_25getPoint (uint i) const
const std::vector< Point_25 > & getPoints () const
void setPoint (uint i, const Point_25 &v)
const Point_25front () const
const Point_25back () const
const Point_25back (uint n) const
Point_25 pop_back ()
bool isPlanarAt (uint i) const
Segment_2 getSegmentAt (uint i) const
uint numPoints () const
bool empty () const
uint numLayerChanges () const
Real length () const
 Length of the path (assumes it is contiguous).
Real RMSD () const
 The root mean squared distance of the from the straight line between the first and last point (assumes a contiguous path).
float winding () const
 The winding number is the sum of the angles between the segments (0 for an Z, 90 for an L, 180 for a U).
float turning () const
Bbox_2 bbox () const
Bbox_2 bbox (int z) const
void clear ()
void resizeTo1 ()
void setPoints (const std::vector< Point_25 > &, uint start, uint size)
 All modification functions except reverse() invalidate the statistics.
void _add (const Point_25 &v)
 Adds the new point but does not update any statistics or do any checks.
void add (const Point_25 &)
 Adds the new point and updates length and layer change count. Asserts that layer changes don't have planar movement.
void extendTo (const Point_25 &)
 Adds the new point; replaces the last point if the new one continues the segment formed by the last two points (but not if its between the last two, i.e. if the path turns back).
void append (const Path &)
void reverse ()
uint removeUnnecessaryPoints ()
void computeLength ()
 These need to be called whenever segments are added or removed.
void computeRMSD ()
void computeWinding ()
bool compare (const Path &) const
Real squared_distance (const Point_25 &, Real dz=std::numeric_limits< Real >::infinity()) const
Real squared_distance (const Pin &) const
bool intersects (const Path &) const
bool violatesClearance (const Path &, Real clearance) const
bool violatesClearance (const Via &, Real clearance) const
uint countIntersections (const Path &) const
std::string str () const
PyObject * getIntegerPointsPy (Real scaleXY) const
PyObject * getPointsNumpy () const

Protected Attributes

std::vector< Point_25mPoints
uint mNumLayerChanges {0}
Real mLength {0.0f}
Real mRMSD
float mWinding
float mTurning

The documentation for this class was generated from the following file: