45#define PNS_HULL_MARGIN 10
206 wxS(
"Warning: converting a complex viastack to normal in PNS_LINE" ) );
212 virtual void Mark(
int aMarker )
const override;
213 virtual void Unmark(
int aMarker = -1 )
const override;
214 virtual int Marker()
const override;
222 void SetRank(
int aRank )
override;
223 int Rank()
const override;
std::optional< BOX2I > OPT_BOX2I
Represent route directions & corner angles in a 45-degree metric.
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)
int FindSegment(const SEGMENT *aSeg) const
const VECTOR2I & CPoint(int aIdx) const
ITEM * GetBlockingObstacle() const
OPT_BOX2I ChangedArea(const LINE *aOther) const
bool HasLockedSegments() const
int Rank() const override
void dragCorner45(const VECTOR2I &aP, int aIndex, DIRECTION_45 aPreferredEndingDirection)
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()
const SHAPE * Shape(int aLayer) const override
Modifiable accessor to the underlying shape.
void DragCorner(const VECTOR2I &aP, int aIndex, bool aFreeAngle=false, DIRECTION_45 aPreferredEndingDirection=DIRECTION_45())
virtual int Marker() const override
void AppendVia(const VIA &aVia)
static bool ClassOf(const ITEM *aItem)
void SetSnapThreshhold(int aThreshhold)
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)
LINE(VIA *aVia)
Construct a LINE for a lone VIA (ie a stitching via).
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.
int Diameter(int aLayer) const
void SetDiameter(int aLayer, int aDiameter)
void SetDrill(int aDrill)
static constexpr int ALL_LAYERS
void SetStackMode(STACK_MODE aStackMode)
STACK_MODE StackMode() const
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.