44 #define PNS_HULL_MARGIN 10 201 virtual void Mark(
int aMarker )
const override;
202 virtual void Unmark(
int aMarker = -1 )
const override;
203 virtual int Marker()
const override;
211 void SetRank(
int aRank )
override;
212 int Rank()
const override;
257 #endif // __PNS_LINE_H const SHAPE_LINE_CHAIN & CLine() const
Base class for PNS router board items.
LINE(const LINE &aBase, const SHAPE_LINE_CHAIN &aLine)
Copy properties (net, layers, etc.) from a base line and replaces the shape by another.
void SetViaDiameter(int aDiameter)
Keep the router "world" - i.e.
OPT_BOX2I ChangedArea(const LINE *aOther) const
bool Walkaround(SHAPE_LINE_CHAIN aObstacle, SHAPE_LINE_CHAIN &aPre, SHAPE_LINE_CHAIN &aWalk, SHAPE_LINE_CHAIN &aPost, bool aCw) const
Calculate a line tightly wrapping a convex hull of an obstacle object (aObstacle).
LINE()
Makes an empty line.
void DragSegment(const VECTOR2I &aP, int aIndex, bool aFreeAngle=false)
LINE & operator=(const LINE &aOther)
const SEG CSegment(int aIdx) const
Set line width.
VECTOR2I snapToNeighbourSegments(const SHAPE_LINE_CHAIN &aPath, const VECTOR2I &aP, int aIndex) const
bool Is45Degree() const
Print out all linked segments.
int Rank() const override
void AppendVia(const VIA &aVia)
Represents a track on a PCB, connecting two non-trivial joints (that is, vias, pads,...
void dragSegmentFree(const VECTOR2I &aP, int aIndex)
int PointCount() const
Function PointCount()
LINE(const VIA &aVia)
Construct a LINE for a lone VIA (ie a stitching via).
ITEM * m_blockingObstacle
For mark obstacle mode.
void SetWidth(int aWidth)
Return line width.
const VECTOR2I & CPoint(int aIdx) const
SHAPE_LINE_CHAIN m_line
The actual shape of the line.
void SetShape(const SHAPE_LINE_CHAIN &aLine)
Return the shape of the line.
void SetDiameter(int aDiameter)
bool IsLinkedChecked() const
Assign a shape to the line (a polyline/line chain).
int GetSnapThreshhold() const
const SHAPE * Shape() const override
Modifiable accessor to the underlying shape.
const VECTOR2I & CPoint(int aIndex) const
Function Point()
void SetWidth(int aWidth)
Sets the width of all segments in the chain.
void Reverse()
Clip the line to the nearest obstacle, traversing from the line's start vertex (0).
bool IsLinked() const
Check if the segment aLink is a part of the line.
void ClipVertexRange(int aStart, int aEnd)
Return the number of corners of angles specified by mask aAngles.
const LINE ClipToNearestObstacle(NODE *aNode) const
Clip the line to a given range of vertices.
int ShapeCount() const
Returns the number of shapes (line segments or arcs) in this line chain.
An abstract shape on 2D plane.
bool m_hasVia
Optional via at the end point.
void SetRank(int aRank) override
int SegmentCount() const
Function SegmentCount()
void dragCorner45(const VECTOR2I &aP, int aIndex)
SHAPE_LINE_CHAIN & Line()
void DragCorner(const VECTOR2I &aP, int aIndex, bool aFreeAngle=false)
void SetViaDrill(int aDrill)
int ShapeCount() const
Return the aIdx-th point of the line.
virtual int Marker() const override
const SEG CSegment(int aIndex) const
Function CSegment()
int m_snapThreshhold
Width to smooth out jagged segments.
int Width() const
Return true if the line is geometrically identical as line aOther.
void SetDrill(int aDrill)
PnsKind Kind() const
Return the type (kind) of the item.
ITEM * GetBlockingObstacle() const
void dragSegment45(const VECTOR2I &aP, int aIndex)
static bool ClassOf(const ITEM *aItem)
bool CompareGeometry(const LINE &aOther)
Reverse the point/vertex order.
Push and Shove diff pair dimensions (gap) settings dialog.
void dragCornerFree(const VECTOR2I &aP, int aIndex)
virtual LINE * Clone() const override
Return a deep copy of the item.
const LAYER_RANGE & Layers() const
virtual void Unmark(int aMarker=-1) const override
void SetSnapThreshhold(int aThreshhold)
bool HasLockedSegments() const
int CountCorners(int aAngles) const
virtual void Mark(int aMarker) const override
void SetBlockingObstacle(ITEM *aObstacle)
VECTOR2I snapDraggedCorner(const SHAPE_LINE_CHAIN &aPath, const VECTOR2I &aP, int aIndex) const