23 #ifndef __PNS_DIFF_PAIR_H 24 #define __PNS_DIFF_PAIR_H 181 void SetFitVias(
bool aEnable,
int aDiameter = 0,
int aViaGap = -1 )
197 bool aViaMode =
false );
240 const SEG& aCoupledN,
const SEG& aParentN,
int aIndexN ) :
DIFF_PAIR(const SHAPE_LINE_CHAIN &aP, const SHAPE_LINE_CHAIN &aN, int aGap=0)
const SHAPE_LINE_CHAIN & CLine() const
Base class for PNS router board items.
const SHAPE_LINE_CHAIN & EntryN() const
void buildEntries(const VECTOR2I &p0_p, const VECTOR2I &p0_n)
DP_PRIMITIVE_PAIR & operator=(const DP_PRIMITIVE_PAIR &aOther)
const std::vector< DP_GATEWAY > & CGateways() const
bool FitGateways(DP_GATEWAYS &aEntry, DP_GATEWAYS &aTarget, bool aPrefDiagonal, DIFF_PAIR &aDp)
void BuildForCursor(const VECTOR2I &aCursorPos)
void CoupledSegmentPairs(COUPLED_SEGMENTS_VEC &aPairs) const
void SetShape(const SHAPE_LINE_CHAIN &aP, const SHAPE_LINE_CHAIN &aN, bool aSwapLanes=false)
void SetPriority(int aPriority)
const VECTOR2I & AnchorN() const
void SetLayer(int aLayer)
void AppendVias(const VIA &aViaP, const VIA &aViaN)
bool EndsWithVias() const
const VECTOR2I & AnchorP() const
bool HasEntryLines() const
RANGED_NUM< int > m_gapConstraint
std::vector< DP_GATEWAY > m_gateways
DIRECTION_45 DirP() const
const SHAPE_LINE_CHAIN & CN() const
SHAPE_LINE_CHAIN m_entryN
void FilterByOrientation(int aAngleMask, DIRECTION_45 aRefOrientation)
std::vector< DP_GATEWAY > & Gateways()
void Append(const DIFF_PAIR &aOther)
void buildDpContinuation(const DP_PRIMITIVE_PAIR &aPair, bool aIsDiagonal)
double CoupledLength() const
void AppendVia(const VIA &aVia)
Represents a track on a PCB, connecting two non-trivial joints (that is, vias, pads,...
bool BuildInitial(const DP_GATEWAY &aEntry, const DP_GATEWAY &aTarget, bool aPrefDiagonal)
const VECTOR2I & AnchorN() const
void SetEntryLines(const SHAPE_LINE_CHAIN &aEntryP, const SHAPE_LINE_CHAIN &aEntryN)
const RANGED_NUM< int > GapConstraint() const
static bool ClassOf(const ITEM *aItem)
void Append(int aX, int aY, bool aAllowDuplication=false)
Append a new point at the end of the line chain.
void SetWidth(int aWidth)
Return line width.
void SetShape(const SHAPE_LINE_CHAIN &aLine)
Return the shape of the line.
void SetDiameter(int aDiameter)
DIRECTION_45 anchorDirection(const ITEM *aItem, const VECTOR2I &aP) const
void SetWidth(int aWidth)
Set the width of all segments in the chain.
void BuildFromPrimitivePair(const DP_PRIMITIVE_PAIR &aPair, bool aPreferDiagonal)
std::vector< COUPLED_SEGMENTS > COUPLED_SEGMENTS_VEC
void SetFitVias(bool aEnable, int aDiameter=0, int aViaGap=-1)
Represent route directions & corner angles in a 45-degree metric.
void updateLine(LINE &aLine, const SHAPE_LINE_CHAIN &aShape, int aNet, const VIA &aVia)
bool IsLinked() const
Check if the segment aLink is a part of the line.
int AllowedAngles() const
SHAPE_LINE_CHAIN m_entryP
static DIFF_PAIR * AssembleDp(LINE *aLine)
void SetViaDiameter(int aDiameter)
DIRECTION_45 DirN() const
void SetWidth(int aWidth)
const SHAPE_LINE_CHAIN & EntryP() const
int SegmentCount() const
Return the number of segments in this line chain.
DIFF_PAIR * Clone() const override
Return a deep copy of the item.
const VECTOR2I & AnchorP() const
Basic class for a differential pair.
bool CheckConnectionAngle(const DIFF_PAIR &aOther, int allowedAngles) const
const SHAPE_LINE_CHAIN & CP() const
void BuildOrthoProjections(DP_GATEWAYS &aEntries, const VECTOR2I &aCursorPos, int aOrthoScore)
Store starting/ending primitives (pads, vias or segments) for a differential pair.
virtual void ClearLinks()
Return the number of segments that were assembled together to form this line.
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
double TotalLength() const
DIFF_PAIR(const LINE &aLineP, const LINE &aLineN, int aGap=0)
DP_GATEWAY(const VECTOR2I &aAnchorP, const VECTOR2I &aAnchorN, bool aIsDiagonal, int aAllowedEntryAngles=DIRECTION_45::ANG_OBTUSE, int aPriority=0)
void SetDrill(int aDrill)
PnsKind Kind() const
Return the type (kind) of the item.
void Clear()
Remove all points from the line chain.
double CoupledLengthFactor() const
void CursorOrientation(const VECTOR2I &aCursorPos, VECTOR2I &aMidpoint, VECTOR2I &aDirection) const
const DIFF_PAIR Entry() const
void BuildGeneric(const VECTOR2I &p0_p, const VECTOR2I &p0_n, bool aBuildEntries=false, bool aViaMode=false)
A set of gateways calculated for the cursor or starting/ending primitive pair.
void SetViaDrill(int aDrill)
Push and Shove diff pair dimensions (gap) settings dialog.
COUPLED_SEGMENTS(const SEG &aCoupledP, const SEG &aParentP, int aIndexP, const SEG &aCoupledN, const SEG &aParentN, int aIndexN)
bool checkDiagonalAlignment(const VECTOR2I &a, const VECTOR2I &b) const
void SetShape(const DIFF_PAIR &aPair)
const LAYER_RANGE & Layers() const
Define a "gateway" for routing a differential pair - e.g.
DP_PRIMITIVE_PAIR EndingPrimitives()
void SetAnchors(const VECTOR2I &aAnchorP, const VECTOR2I &aAnchorN)
virtual void ClearLinks() override
Return the number of segments that were assembled together to form this line.
void SetNets(int aP, int aN)