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