44#define PNS_HULL_MARGIN 10
199 virtual void Mark(
int aMarker )
const override;
200 virtual void Unmark(
int aMarker = -1 )
const override;
201 virtual int Marker()
const override;
209 void SetRank(
int aRank )
override;
210 int Rank()
const override;
std::optional< BOX2I > OPT_BOX2I
Base class for PNS router board items.
const PNS_LAYER_RANGE & Layers() const
virtual NET_HANDLE Net() const
PnsKind Kind() const
Return the type (kind) of the item.
Represents a track on a PCB, connecting two non-trivial joints (that is, vias, pads,...
VECTOR2I snapToNeighbourSegments(const SHAPE_LINE_CHAIN &aPath, const VECTOR2I &aP, int aIndex) const
void ClipVertexRange(int aStart, int aEnd)
Return the number of corners of angles specified by mask aAngles.
void SetViaDrill(int aDrill)
const VECTOR2I & CPoint(int aIdx) const
ITEM * GetBlockingObstacle() const
LINE(const VIA &aVia)
Construct a LINE for a lone VIA (ie a stitching via).
OPT_BOX2I ChangedArea(const LINE *aOther) const
bool HasLockedSegments() const
int Rank() const override
const SHAPE * Shape() const override
Modifiable accessor to the underlying shape.
const LINE ClipToNearestObstacle(NODE *aNode) const
Clip the line to a given range of vertices.
void SetShape(const SHAPE_LINE_CHAIN &aLine)
Return the shape of the line.
virtual void Mark(int aMarker) const override
bool CompareGeometry(const LINE &aOther)
Reverse the point/vertex order.
ITEM * m_blockingObstacle
For mark obstacle mode.
const SHAPE_LINE_CHAIN & CLine() const
VECTOR2I snapDraggedCorner(const SHAPE_LINE_CHAIN &aPath, const VECTOR2I &aP, int aIndex) const
LINE & operator=(const LINE &aOther)
void dragSegment45(const VECTOR2I &aP, int aIndex)
int CountCorners(int aAngles) const
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 SetRank(int aRank) override
LINE()
Makes an empty line.
SHAPE_LINE_CHAIN & Line()
virtual int Marker() const override
void AppendVia(const VIA &aVia)
static bool ClassOf(const ITEM *aItem)
void SetSnapThreshhold(int aThreshhold)
void dragCorner45(const VECTOR2I &aP, int aIndex)
void DragCorner(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)
virtual void Unmark(int aMarker=-1) const override
int m_snapThreshhold
Width to smooth out jagged segments.
int ShapeCount() const
Return the aIdx-th point of the line.
SHAPE_LINE_CHAIN m_line
The actual shape of the line.
void SetWidth(int aWidth)
Return line width.
int GetSnapThreshhold() const
void DragSegment(const VECTOR2I &aP, int aIndex, bool aFreeAngle=false)
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)
void Reverse()
Clip the line to the nearest obstacle, traversing from the line's start vertex (0).
const SEG CSegment(int aIdx) const
Set line width.
void dragCornerFree(const VECTOR2I &aP, int aIndex)
virtual LINE * Clone() const override
Return a deep copy of the item.
int Width() const
Return true if the line is geometrically identical as line aOther.
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 SetDrill(int aDrill)
VIA * Clone() const override
Return a deep copy of the item.
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.