94 if(
const LINE* l = dyn_cast<const LINE*>( item ) )
96 total += l->CLine().Length();
125 const std::vector<ssize_t>& tunedShapes = tuned.CShapes();
127 for(
int i = 0; i < tuned.SegmentCount(); i++ )
129 if( tunedShapes[i] >= 0 )
132 const SEG s = tuned.CSegment( i );
153 if(
const LINE* l = dyn_cast<const LINE*>( item ) )
167 tuned.Append ( m->CLine( 0 ) );
237 int w = aShape->
Width();
269 status =
_(
"Too long: " );
272 status =
_(
"Too short: " );
275 status =
_(
"Tuned: " );
const SHAPE_LINE_CHAIN & CLine() const
int GetTotalPadToDieLength(const LINE &aLine) const
Base class for PNS router board items.
Base class for Single trace & Differential pair meandering tools, as both of them share a lot of code...
ROUTER * Router() const
Return current router settings.
wxString MessageTextFromValue(EDA_UNITS aUnits, int aValue, bool aAddUnitLabel, EDA_DATA_TYPE aType)
Convert a value to a string using double notation.
virtual bool FixRoute(const VECTOR2I &aP, ITEM *aEndItem, bool aForceFinish=false) override
Function FixRoute()
bool CheckSelfIntersections(MEANDER_SHAPE *aShape, int aClearance)
Check if the given shape is intersecting with any other meander in the current line.
Keep the router "world" - i.e.
virtual void AddLine(const SHAPE_LINE_CHAIN &aLine, int aType=0, int aWidth=0, const std::string aName="")
virtual bool Start(const VECTOR2I &aP, ITEM *aStartItem) override
Function Start()
The geometry of a single meander.
Implementation of conversion functions that require both schematic and board internal units.
SHAPE_LINE_CHAIN & Simplify(bool aRemoveColinear=true)
Function Simplify()
void AddCorner(const VECTOR2I &aA, const VECTOR2I &aB=VECTOR2I(0, 0))
Create a dummy meander shape representing a line corner.
void MeanderSegment(const SEG &aSeg, int aBaseIndex=0)
Fit maximum amplitude meanders on a given segment and adds to the current line.
TUNING_STATUS m_lastStatus
MEANDER_PLACER(ROUTER *aRouter)
long long int m_lastLength
virtual ~MEANDER_PLACER()
LINKED_ITEM * m_initialSegment
virtual bool Move(const VECTOR2I &aP, ITEM *aEndItem) override
Function Move()
Represents a track on a PCB, connecting two non-trivial joints (that is, vias, pads,...
NODE * Branch()
Create a lightweight copy (called branch) of self that tracks the changes (added/removed items) wrs t...
TUNING_STATUS
< Result of the length tuning operation
int m_currentWidth
Meander settings.
void Append(int aX, int aY, bool aAllowDuplication=false)
Function Append()
void Remove(ARC *aArc)
Remove an item from this branch.
void SetWidth(int aWidth)
Set the line width.
NODE * CurrentNode(bool aLoopsRemoved=false) const override
Function CurrentNode()
const ITEM_SET AssembleTrivialPath(ITEM *aStart)
const LINE AssembleLine(LINKED_ITEM *aSeg, int *aOriginSegmentIndex=NULL, bool aStopAtLockedJoints=false)
Follow the joint map to assemble a line connecting two non-trivial joints starting from segment aSeg.
std::vector< MEANDER_SHAPE * > & Meanders()
const ITEM_SET Traces() override
Function Traces()
NODE * m_world
Total length added by pad to die size.
bool AbortPlacement() override
bool doMove(const VECTOR2I &aP, ITEM *aEndItem, long long int aTargetLength)
bool CommitPlacement() override
const SHAPE_LINE_CHAIN & CLine(int aShape) const
DEBUG_DECORATOR * Dbg() const
void SetFailureReason(const wxString &aReason)
void tuneLineLength(MEANDERED_LINE &aTuned, long long int aElongation)
Take a set of meanders in aTuned and tunes their length to extend the original line length by aElonga...
bool HasPlacedAnything() const override
VECTOR2I getSnappedStartPoint(LINKED_ITEM *aStartItem, VECTOR2I aStartPoint)
Pointer to world to search colliding items.
Represent a set of meanders fitted over a single or two lines.
int m_padToDieLenth
Width of the meandered trace(s).
int CurrentLayer() const override
Function CurrentLayer()
VECTOR2I m_currentStart
Current world state.
bool CheckFit(MEANDER_SHAPE *aShape) override
Checks if it's OK to place the shape aShape (i.e.
MEANDER_SETTINGS m_settings
The current end point.
int m_lengthTolerance
Number of line segments for arc approximation.
OPT_OBSTACLE CheckColliding(const ITEM *aItem, int aKindMask=ITEM::ANY_T)
Check if the item collides with anything else in the world, and if found, returns the obstacle.
int compareWithTolerance(long long int aValue, long long int aExpected, long long int aTolerance=0) const
Compare aValue against aExpected with given tolerance.
bool OfKind(int aKindMask) const
Return true if the item's type matches the mask aKindMask.
long long int m_targetLength
Type of corners for the meandered line.
const ENTRIES & CItems() const
int Width() const
Return true if the line is geometrically identical as line aOther.
void Clear()
Function Clear() Removes all points from the line chain.
SHAPE_LINE_CHAIN m_finalShape
int m_spacing
Amplitude/spacing adjustment step.
Push and Shove diff pair dimensions (gap) settings dialog.
void SetBaselineOffset(int aOffset)
Set the parallel offset between the base segment and the meandered line.
virtual long long int origPathLength() const
current routing start point (end of tail, beginning of head)
bool Add(std::unique_ptr< SEGMENT > aSegment, bool aAllowRedundant=false)
Add an item to the current node.
const VECTOR2I & CurrentEnd() const override
Function CurrentEnd()
virtual TUNING_STATUS TuningStatus() const override
Return the tuning status (too short, too long, etc.) of the trace(s) being tuned.
void cutTunedLine(const SHAPE_LINE_CHAIN &aOrigin, const VECTOR2I &aTuneStart, const VECTOR2I &aCursorPos, SHAPE_LINE_CHAIN &aPre, SHAPE_LINE_CHAIN &aTuned, SHAPE_LINE_CHAIN &aPost)
Extract the part of a track to be meandered, depending on the starting point and the cursor position.
const LAYER_RANGE & Layers() const
virtual const wxString TuningInfo(EDA_UNITS aUnits) const override
Return a string describing the status and length of the tuned traces.