KiCad PCB EDA Suite
PNS::MEANDER_SKEW_PLACER Class Reference

MEANDER_SKEW_PLACER. More...

#include <pns_meander_skew_placer.h>

Inheritance diagram for PNS::MEANDER_SKEW_PLACER:
PNS::MEANDER_PLACER PNS::MEANDER_PLACER_BASE PNS::PLACEMENT_ALGO PNS::ALGO_BASE

Public Types

enum  TUNING_STATUS { TOO_SHORT = 0, TOO_LONG, TUNED }
 < Result of the length tuning operation More...
 

Public Member Functions

 MEANDER_SKEW_PLACER (ROUTER *aRouter)
 
 ~MEANDER_SKEW_PLACER ()
 
bool Start (const VECTOR2I &aP, ITEM *aStartItem) override
 Function Start() More...
 
bool Move (const VECTOR2I &aP, ITEM *aEndItem) override
 Function Move() More...
 
const wxString TuningInfo (EDA_UNITS aUnits) const override
 Return a string describing the status and length of the tuned traces. More...
 
virtual bool FixRoute (const VECTOR2I &aP, ITEM *aEndItem, bool aForceFinish=false) override
 Function FixRoute() More...
 
bool CommitPlacement () override
 
bool AbortPlacement () override
 
bool HasPlacedAnything () const override
 
NODECurrentNode (bool aLoopsRemoved=false) const override
 Function CurrentNode() More...
 
const ITEM_SET Traces () override
 Function Traces() More...
 
const VECTOR2ICurrentEnd () const override
 Function CurrentEnd() More...
 
const std::vector< int > CurrentNets () const override
 Function CurrentNets() More...
 
int CurrentLayer () const override
 Function CurrentLayer() More...
 
virtual TUNING_STATUS TuningStatus () const override
 Return the tuning status (too short, too long, etc.) of the trace(s) being tuned. More...
 
bool CheckFit (MEANDER_SHAPE *aShape) override
 Checks if it's OK to place the shape aShape (i.e. More...
 
virtual void AmplitudeStep (int aSign)
 Increase/decreases the current meandering amplitude by one step. More...
 
virtual void SpacingStep (int aSign)
 Increase/decrease the current meandering spacing by one step. More...
 
virtual const MEANDER_SETTINGSMeanderSettings () const
 Return the current meandering configuration. More...
 
virtual void UpdateSettings (const MEANDER_SETTINGS &aSettings)
 
int GetTotalPadToDieLength (const LINE &aLine) const
 
virtual bool UnfixRoute ()
 
virtual bool ToggleVia (bool aEnabled)
 Function ToggleVia() More...
 
virtual bool IsPlacingVia () const
 Function IsPlacingVia() More...
 
virtual bool SetLayer (int aLayer)
 Function SetLayer() More...
 
virtual void FlipPosture ()
 Function FlipPosture() More...
 
virtual void UpdateSizes (const SIZES_SETTINGS &aSizes)
 Function UpdateSizes() More...
 
virtual void SetOrthoMode (bool aOrthoMode)
 Function SetOrthoMode() More...
 
virtual void GetModifiedNets (std::vector< int > &aNets) const
 Function GetModifiedNets. More...
 
ROUTERRouter () const
 Return current router settings. More...
 
ROUTING_SETTINGSSettings () const
 Return the logger object, allowing to dump geometry to a file. More...
 
virtual LOGGERLogger ()
 
void SetLogger (LOGGER *aLogger)
 
void SetDebugDecorator (DEBUG_DECORATOR *aDecorator)
 Assign a debug decorator allowing this algo to draw extra graphics for visual debugging. More...
 
DEBUG_DECORATORDbg () const
 
const BOX2IVisibleViewArea () const
 

Protected Member Functions

bool doMove (const VECTOR2I &aP, ITEM *aEndItem, long long int aTargetLength)
 
void setWorld (NODE *aWorld)
 
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. More...
 
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 aElongation. More...
 
int compareWithTolerance (long long int aValue, long long int aExpected, long long int aTolerance=0) const
 Compare aValue against aExpected with given tolerance. More...
 
VECTOR2I getSnappedStartPoint (LINKED_ITEM *aStartItem, VECTOR2I aStartPoint)
 
long long int lineLength (const ITEM_SET &aLine) const
 Calculate the total length of the line represented by an item set (tracks and vias) More...
 

Protected Attributes

VECTOR2I m_currentStart
 Current world state. More...
 
NODEm_currentNode
 
LINE m_originLine
 
LINE m_currentTrace
 
SHAPE_LINE_CHAIN m_finalShape
 
MEANDERED_LINE m_result
 
LINKED_ITEMm_initialSegment
 
long long int m_lastLength
 
TUNING_STATUS m_lastStatus
 
NODEm_world
 Total length added by pad to die size. More...
 
int m_padToDieLength
 Width of the meandered trace(s). More...
 
int m_currentWidth
 Meander settings. More...
 
MEANDER_SETTINGS m_settings
 The current end point. More...
 
VECTOR2I m_currentEnd
 
DEBUG_DECORATORm_debugDecorator
 
ROUTERm_router
 
LOGGERm_logger
 

Private Member Functions

long long int currentSkew () const
 
long long int origPathLength () const override
 current routing start point (end of tail, beginning of head) More...
 

Private Attributes

DIFF_PAIR m_originPair
 
ITEM_SET m_tunedPath
 
ITEM_SET m_tunedPathP
 
ITEM_SET m_tunedPathN
 
long long int m_coupledLength
 
int m_padToDieP
 
int m_padToDieN
 

Detailed Description

MEANDER_SKEW_PLACER.

Differential pair skew adjustment algorithm.

Definition at line 39 of file pns_meander_skew_placer.h.

Member Enumeration Documentation

◆ TUNING_STATUS

< Result of the length tuning operation

Enumerator
TOO_SHORT 
TOO_LONG 
TUNED 

Definition at line 49 of file pns_meander_placer_base.h.

Constructor & Destructor Documentation

◆ MEANDER_SKEW_PLACER()

PNS::MEANDER_SKEW_PLACER::MEANDER_SKEW_PLACER ( ROUTER aRouter)

Definition at line 35 of file pns_meander_skew_placer.cpp.

35  :
36  MEANDER_PLACER ( aRouter )
37 {
38  // Init temporary variables (do not leave uninitialized members)
39  m_coupledLength = 0;
40  m_padToDieN = 0;
41  m_padToDieP = 0;
42 }
MEANDER_PLACER(ROUTER *aRouter)

References m_coupledLength, m_padToDieN, and m_padToDieP.

◆ ~MEANDER_SKEW_PLACER()

PNS::MEANDER_SKEW_PLACER::~MEANDER_SKEW_PLACER ( )

Definition at line 45 of file pns_meander_skew_placer.cpp.

46 {
47 }

Member Function Documentation

◆ AbortPlacement()

bool PNS::MEANDER_PLACER::AbortPlacement ( )
overridevirtualinherited

Reimplemented from PNS::PLACEMENT_ALGO.

Definition at line 206 of file pns_meander_placer.cpp.

207 {
209  return true;
210 }
void KillChildren()
Definition: pns_node.cpp:1369
NODE * m_world
Total length added by pad to die size.

References PNS::NODE::KillChildren(), and PNS::MEANDER_PLACER_BASE::m_world.

◆ AmplitudeStep()

void PNS::MEANDER_PLACER_BASE::AmplitudeStep ( int  aSign)
virtualinherited

Increase/decreases the current meandering amplitude by one step.

Parameters
aSigndirection (negative = decrease, positive = increase).

Definition at line 44 of file pns_meander_placer_base.cpp.

45 {
46  int a = m_settings.m_maxAmplitude + aSign * m_settings.m_step;
47  a = std::max( a, m_settings.m_minAmplitude );
48 
50 }
int m_minAmplitude
Maximum meandering amplitude.
Definition: pns_meander.h:76
int m_step
Length PadToDie.
Definition: pns_meander.h:82
MEANDER_SETTINGS m_settings
The current end point.
int m_maxAmplitude
Meandering period/spacing (see dialog picture for explanation).
Definition: pns_meander.h:78

References PNS::MEANDER_SETTINGS::m_maxAmplitude, PNS::MEANDER_SETTINGS::m_minAmplitude, PNS::MEANDER_PLACER_BASE::m_settings, and PNS::MEANDER_SETTINGS::m_step.

◆ CheckFit()

bool PNS::MEANDER_PLACER::CheckFit ( MEANDER_SHAPE aShape)
overridevirtualinherited

Checks if it's OK to place the shape aShape (i.e.

if it doesn't cause DRC violations or collide with other meanders).

Parameters
aShapethe shape to check.
Returns
true if the shape fits.

Reimplemented from PNS::MEANDER_PLACER_BASE.

Definition at line 229 of file pns_meander_placer.cpp.

230 {
231  LINE l( m_originLine, aShape->CLine( 0 ) );
232 
233  if( m_currentNode->CheckColliding( &l ) )
234  return false;
235 
236  int w = aShape->Width();
237  int clearance = w + m_settings.m_spacing;
238 
239  return m_result.CheckSelfIntersections( aShape, clearance );
240 }
const SHAPE_LINE_CHAIN & CLine() const
Definition: pns_line.h:137
bool CheckSelfIntersections(MEANDER_SHAPE *aShape, int aClearance)
Check if the given shape is intersecting with any other meander in the current line.
MEANDER_SETTINGS m_settings
The current end point.
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.
Definition: pns_node.cpp:433
int m_spacing
Amplitude/spacing adjustment step.
Definition: pns_meander.h:80

References PNS::NODE::CheckColliding(), PNS::MEANDERED_LINE::CheckSelfIntersections(), PNS::MEANDER_SHAPE::CLine(), PNS::MEANDER_PLACER::m_currentNode, PNS::MEANDER_PLACER::m_originLine, PNS::MEANDER_PLACER::m_result, PNS::MEANDER_PLACER_BASE::m_settings, PNS::MEANDER_SETTINGS::m_spacing, and PNS::MEANDER_SHAPE::Width().

◆ CommitPlacement()

bool PNS::MEANDER_PLACER::CommitPlacement ( )
overridevirtualinherited

Reimplemented from PNS::PLACEMENT_ALGO.

Definition at line 219 of file pns_meander_placer.cpp.

220 {
221  if( m_currentNode )
223 
225  return true;
226 }
ROUTER * Router() const
Return current router settings.
Definition: pns_algo_base.h:54
void CommitRouting()
Definition: pns_router.cpp:694
#define NULL

References PNS::ROUTER::CommitRouting(), PNS::MEANDER_PLACER::m_currentNode, NULL, and PNS::ALGO_BASE::Router().

Referenced by PNS::MEANDER_PLACER::FixRoute().

◆ compareWithTolerance()

int PNS::MEANDER_PLACER_BASE::compareWithTolerance ( long long int  aValue,
long long int  aExpected,
long long int  aTolerance = 0 
) const
protectedinherited

Compare aValue against aExpected with given tolerance.

Definition at line 228 of file pns_meander_placer_base.cpp.

230 {
231  if( aValue < aExpected - aTolerance )
232  return -1;
233  else if( aValue > aExpected + aTolerance )
234  return 1;
235  else
236  return 0;
237 }

Referenced by PNS::MEANDER_PLACER::doMove(), and PNS::DP_MEANDER_PLACER::Move().

◆ CurrentEnd()

const VECTOR2I & PNS::MEANDER_PLACER::CurrentEnd ( ) const
overridevirtualinherited

Function CurrentEnd()

Returns the current end of the line(s) being placed/tuned. It may not be equal to the cursor position due to collisions.

Implements PNS::PLACEMENT_ALGO.

Definition at line 250 of file pns_meander_placer.cpp.

251 {
252  return m_currentEnd;
253 }

References PNS::MEANDER_PLACER_BASE::m_currentEnd.

◆ CurrentLayer()

int PNS::MEANDER_PLACER::CurrentLayer ( ) const
overridevirtualinherited

Function CurrentLayer()

Returns the layer of currently routed track.

Implements PNS::PLACEMENT_ALGO.

Definition at line 255 of file pns_meander_placer.cpp.

256 {
257  return m_initialSegment->Layers().Start();
258 }
LINKED_ITEM * m_initialSegment
int Start() const
Definition: pns_layerset.h:82
const LAYER_RANGE & Layers() const
Definition: pns_item.h:152

References PNS::ITEM::Layers(), PNS::MEANDER_PLACER::m_initialSegment, and LAYER_RANGE::Start().

◆ CurrentNets()

const std::vector<int> PNS::MEANDER_PLACER::CurrentNets ( ) const
inlineoverridevirtualinherited

Function CurrentNets()

Returns the net code(s) of currently routed track(s).

Implements PNS::PLACEMENT_ALGO.

Definition at line 80 of file pns_meander_placer.h.

81  {
82  return std::vector<int> (1, m_originLine.Net() );
83  }
int Net() const
Definition: pns_item.h:150

References PNS::MEANDER_PLACER::m_originLine, and PNS::ITEM::Net().

◆ CurrentNode()

NODE * PNS::MEANDER_PLACER::CurrentNode ( bool  aLoopsRemoved = false) const
overridevirtualinherited

Function CurrentNode()

Returns the most recent board state.

Implements PNS::PLACEMENT_ALGO.

Definition at line 51 of file pns_meander_placer.cpp.

52 {
53  if( !m_currentNode )
54  return m_world;
55 
56  return m_currentNode;
57 }
NODE * m_world
Total length added by pad to die size.

References PNS::MEANDER_PLACER::m_currentNode, and PNS::MEANDER_PLACER_BASE::m_world.

◆ currentSkew()

long long int PNS::MEANDER_SKEW_PLACER::currentSkew ( ) const
private

Definition at line 132 of file pns_meander_skew_placer.cpp.

133 {
134  return m_lastLength - m_coupledLength;
135 }
long long int m_lastLength

References m_coupledLength, and PNS::MEANDER_PLACER::m_lastLength.

◆ cutTunedLine()

void PNS::MEANDER_PLACER_BASE::cutTunedLine ( const SHAPE_LINE_CHAIN aOrigin,
const VECTOR2I aTuneStart,
const VECTOR2I aCursorPos,
SHAPE_LINE_CHAIN aPre,
SHAPE_LINE_CHAIN aTuned,
SHAPE_LINE_CHAIN aPost 
)
protectedinherited

Extract the part of a track to be meandered, depending on the starting point and the cursor position.

Parameters
aOriginthe original line.
aTuneStartpoint where we start meandering (start click coordinates).
aCursorPoscurrent cursor position.
aPrepart before the beginning of meanders.
aTunedpart to be meandered.
aPostpart after the end of meanders.

Definition at line 68 of file pns_meander_placer_base.cpp.

71 {
72  VECTOR2I cp ( aCursorPos );
73 
74  if( cp == aTuneStart ) // we don't like tuning segments with 0 length
75  {
76  int idx = aOrigin.FindSegment( cp );
77 
78  if( idx >= 0 )
79  {
80  const SEG& s = aOrigin.CSegment( idx );
81  cp += (s.B - s.A).Resize(2);
82  }
83  else
84  {
85  cp += VECTOR2I (2, 5); // some arbitrary value that is not 45 degrees oriented
86  }
87  }
88 
89  VECTOR2I n = aOrigin.NearestPoint( cp, false );
90  VECTOR2I m = aOrigin.NearestPoint( aTuneStart, false );
91 
92  SHAPE_LINE_CHAIN l( aOrigin );
93  l.Split( n );
94  l.Split( m );
95 
96  int i_start = l.Find( m );
97  int i_end = l.Find( n );
98 
99  if( i_start > i_end )
100  {
101  l = l.Reverse();
102  i_start = l.Find( m );
103  i_end = l.Find( n );
104  }
105 
106  aPre = l.Slice( 0, i_start );
107  aPost = l.Slice( i_end, -1 );
108  aTuned = l.Slice( i_start, i_end );
109 
110  aTuned.Simplify();
111 }
SHAPE_LINE_CHAIN & Simplify(bool aRemoveColinear=true)
Function Simplify()
const SHAPE_LINE_CHAIN Slice(int aStartIndex, int aEndIndex=-1) const
Function Slice()
VECTOR2< int > VECTOR2I
Definition: vector2d.h:623
int FindSegment(const VECTOR2I &aP, int aThreshold=1) const
Function FindSegment()
const VECTOR2I NearestPoint(const VECTOR2I &aP, bool aAllowInternalShapePoints=true) const
Finds a point on the line chain that is closest to point aP.
Definition: seg.h:40
const SEG CSegment(int aIndex) const
Function CSegment()
SHAPE_LINE_CHAIN.
VECTOR2I A
Definition: seg.h:48
VECTOR2I B
Definition: seg.h:49

References SEG::A, SEG::B, SHAPE_LINE_CHAIN::CSegment(), SHAPE_LINE_CHAIN::Find(), SHAPE_LINE_CHAIN::FindSegment(), SHAPE_LINE_CHAIN::NearestPoint(), SHAPE_LINE_CHAIN::Reverse(), SHAPE_LINE_CHAIN::Simplify(), SHAPE_LINE_CHAIN::Slice(), and SHAPE_LINE_CHAIN::Split().

Referenced by PNS::MEANDER_PLACER::doMove(), and PNS::DP_MEANDER_PLACER::Move().

◆ Dbg()

◆ doMove()

bool PNS::MEANDER_PLACER::doMove ( const VECTOR2I aP,
ITEM aEndItem,
long long int  aTargetLength 
)
protectedinherited

Definition at line 110 of file pns_meander_placer.cpp.

111 {
112  SHAPE_LINE_CHAIN pre, tuned, post;
113 
114  if( m_currentNode )
115  delete m_currentNode;
116 
118 
119  cutTunedLine( m_originLine.CLine(), m_currentStart, aP, pre, tuned, post );
120 
121  m_result = MEANDERED_LINE( this, false );
124 
125  const std::vector<ssize_t>& tunedShapes = tuned.CShapes();
126 
127  for( int i = 0; i < tuned.SegmentCount(); i++ )
128  {
129  if( tunedShapes[i] >= 0 )
130  continue;
131 
132  const SEG s = tuned.CSegment( i );
133  m_result.AddCorner( s.A );
135  m_result.AddCorner( s.B );
136  }
137 
138  long long int lineLen = origPathLength();
139 
140  m_lastLength = lineLen;
142 
143  if( compareWithTolerance( lineLen, aTargetLength, m_settings.m_lengthTolerance ) > 0 )
144  {
146  } else {
147  m_lastLength = lineLen - tuned.Length();
148  tuneLineLength( m_result, aTargetLength - lineLen );
149  }
150 
151  for( const ITEM* item : m_tunedPath.CItems() )
152  {
153  if( const LINE* l = dyn_cast<const LINE*>( item ) )
154  {
155  PNS_DBG( Dbg(), AddLine, l->CLine(), BLUE, 30000, "tuned-line" );
156  }
157  }
158 
159  if( m_lastStatus != TOO_LONG )
160  {
161  tuned.Clear();
162 
163  for( MEANDER_SHAPE* m : m_result.Meanders() )
164  {
165  if( m->Type() != MT_EMPTY )
166  {
167  tuned.Append ( m->CLine( 0 ) );
168  }
169  }
170 
171  m_lastLength += tuned.Length();
172 
173  int comp = compareWithTolerance( m_lastLength - aTargetLength, 0, m_settings.m_lengthTolerance );
174 
175  if( comp > 0 )
177  else if( comp < 0 )
179  else
181  }
182 
184  m_finalShape.Append( pre );
185  m_finalShape.Append( tuned );
186  m_finalShape.Append( post );
188 
189  return true;
190 }
const SHAPE_LINE_CHAIN & CLine() const
Definition: pns_line.h:137
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.
Definition: pns_meander.cpp:45
TUNING_STATUS m_lastStatus
long long int m_lastLength
NODE * Branch()
Create a lightweight copy (called branch) of self that tracks the changes (added/removed items) wrs t...
Definition: pns_node.cpp:127
void Append(int aX, int aY, bool aAllowDuplication=false)
Function Append()
void SetWidth(int aWidth)
Set the line width.
Definition: pns_meander.h:420
std::vector< MEANDER_SHAPE * > & Meanders()
Definition: pns_meander.h:442
NODE * m_world
Total length added by pad to die size.
#define PNS_DBG(dbg, method,...)
DEBUG_DECORATOR * Dbg() const
Definition: pns_algo_base.h:78
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...
Definition: seg.h:40
VECTOR2I m_currentStart
Current world state.
Definition: color4d.h:56
MEANDER_SETTINGS m_settings
The current end point.
int m_lengthTolerance
Target skew value for diff pair de-skewing.
Definition: pns_meander.h:92
SHAPE_LINE_CHAIN.
int compareWithTolerance(long long int aValue, long long int aExpected, long long int aTolerance=0) const
Compare aValue against aExpected with given tolerance.
VECTOR2I A
Definition: seg.h:48
const ENTRIES & CItems() const
Definition: pns_itemset.h:139
int Width() const
Return true if the line is geometrically identical as line aOther.
Definition: pns_line.h:156
void Clear()
Function Clear() Removes all points from the line chain.
SHAPE_LINE_CHAIN m_finalShape
void SetBaselineOffset(int aOffset)
Set the parallel offset between the base segment and the meandered line.
Definition: pns_meander.h:434
virtual long long int origPathLength() const
current routing start point (end of tail, beginning of head)
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.
VECTOR2I B
Definition: seg.h:49

References SEG::A, PNS::MEANDERED_LINE::AddCorner(), SHAPE_LINE_CHAIN::Append(), SEG::B, BLUE, PNS::NODE::Branch(), PNS::ITEM_SET::CItems(), SHAPE_LINE_CHAIN::Clear(), PNS::LINE::CLine(), PNS::MEANDER_PLACER_BASE::compareWithTolerance(), PNS::MEANDER_PLACER_BASE::cutTunedLine(), PNS::ALGO_BASE::Dbg(), PNS::MEANDER_PLACER::m_currentNode, PNS::MEANDER_PLACER::m_currentStart, PNS::MEANDER_PLACER::m_finalShape, PNS::MEANDER_PLACER::m_lastLength, PNS::MEANDER_PLACER::m_lastStatus, PNS::MEANDER_SETTINGS::m_lengthTolerance, PNS::MEANDER_PLACER::m_originLine, PNS::MEANDER_PLACER::m_result, PNS::MEANDER_PLACER_BASE::m_settings, PNS::MEANDER_PLACER::m_tunedPath, PNS::MEANDER_PLACER_BASE::m_world, PNS::MEANDERED_LINE::Meanders(), PNS::MEANDERED_LINE::MeanderSegment(), PNS::MT_EMPTY, PNS::MEANDER_PLACER::origPathLength(), PNS_DBG, PNS::MEANDERED_LINE::SetBaselineOffset(), PNS::MEANDERED_LINE::SetWidth(), SHAPE_LINE_CHAIN::Simplify(), PNS::MEANDER_PLACER_BASE::TOO_LONG, PNS::MEANDER_PLACER_BASE::TOO_SHORT, PNS::MEANDER_PLACER_BASE::TUNED, PNS::MEANDER_PLACER_BASE::tuneLineLength(), and PNS::LINE::Width().

Referenced by Move(), and PNS::MEANDER_PLACER::Move().

◆ FixRoute()

bool PNS::MEANDER_PLACER::FixRoute ( const VECTOR2I aP,
ITEM aEndItem,
bool  aForceFinish = false 
)
overridevirtualinherited

Function FixRoute()

Commits the currently routed items to the parent node, taking aP as the final end point and aEndItem as the final anchor (if provided).

Returns
true, if route has been committed. May return false if the routing result is violating design rules - in such case, the track is only committed if Settings.CanViolateDRC() is on.

Implements PNS::PLACEMENT_ALGO.

Definition at line 193 of file pns_meander_placer.cpp.

194 {
195  if( !m_currentNode )
196  return false;
197 
200  CommitPlacement();
201 
202  return true;
203 }
bool CommitPlacement() override
SHAPE_LINE_CHAIN m_finalShape
bool Add(std::unique_ptr< SEGMENT > aSegment, bool aAllowRedundant=false)
Add an item to the current node.
Definition: pns_node.cpp:621

References PNS::NODE::Add(), PNS::MEANDER_PLACER::CommitPlacement(), PNS::MEANDER_PLACER::m_currentNode, PNS::MEANDER_PLACER::m_currentTrace, PNS::MEANDER_PLACER::m_finalShape, and PNS::MEANDER_PLACER::m_originLine.

◆ FlipPosture()

virtual void PNS::PLACEMENT_ALGO::FlipPosture ( )
inlinevirtualinherited

Function FlipPosture()

Toggles the current posture (straight/diagonal) of the trace head.

Reimplemented in PNS::LINE_PLACER, and PNS::DIFF_PAIR_PLACER.

Definition at line 160 of file pns_placement_algo.h.

161  {
162  }

◆ GetModifiedNets()

virtual void PNS::PLACEMENT_ALGO::GetModifiedNets ( std::vector< int > &  aNets) const
inlinevirtualinherited

Function GetModifiedNets.

Returns the net codes of all currently routed trace(s)

Reimplemented in PNS::LINE_PLACER, and PNS::DIFF_PAIR_PLACER.

Definition at line 191 of file pns_placement_algo.h.

192  {
193  }

◆ getSnappedStartPoint()

VECTOR2I PNS::MEANDER_PLACER_BASE::getSnappedStartPoint ( LINKED_ITEM aStartItem,
VECTOR2I  aStartPoint 
)
protectedinherited

Definition at line 240 of file pns_meander_placer_base.cpp.

241 {
242  if( aStartItem->Kind() == ITEM::SEGMENT_T )
243  {
244  return static_cast<SEGMENT*>( aStartItem )->Seg().NearestPoint( aStartPoint );
245  }
246  else
247  {
248  wxASSERT( aStartItem->Kind() == ITEM::ARC_T );
249  ARC* arc = static_cast<ARC*>( aStartItem );
250 
251  if( ( VECTOR2I( arc->Anchor( 0 ) - aStartPoint ) ).SquaredEuclideanNorm() <=
252  ( VECTOR2I( arc->Anchor( 1 ) - aStartPoint ) ).SquaredEuclideanNorm() )
253  {
254  return arc->Anchor( 0 );
255  }
256  else
257  {
258  return arc->Anchor( 1 );
259  }
260  }
261 }
VECTOR2< int > VECTOR2I
Definition: vector2d.h:623

References PNS::ITEM::ARC_T, PNS::ITEM::Kind(), and PNS::ITEM::SEGMENT_T.

Referenced by Start(), PNS::MEANDER_PLACER::Start(), and PNS::DP_MEANDER_PLACER::Start().

◆ GetTotalPadToDieLength()

int PNS::MEANDER_PLACER_BASE::GetTotalPadToDieLength ( const LINE aLine) const
inherited

Definition at line 184 of file pns_meander_placer_base.cpp.

185 {
186  int length = 0;
187  JOINT start;
188  JOINT end;
189 
190  m_world->FindLineEnds( aLine, start, end );
191 
192  // Extract the length of the pad to die for start and end pads
193  for( auto& link : start.LinkList() )
194  {
195  if( const SOLID* solid = dynamic_cast<const SOLID*>( link.item ) )
196  {
197  // If there are overlapping pads, choose the first with a non-zero length
198  if( solid->GetPadToDie() > 0 )
199  {
200  length += solid->GetPadToDie();
201  break;
202  }
203  }
204  }
205 
206  for( auto& link : end.LinkList() )
207  {
208  if( const SOLID* solid = dynamic_cast<const SOLID*>( link.item ) )
209  {
210  if( solid->GetPadToDie() > 0 )
211  {
212  length += solid->GetPadToDie();
213  break;
214  }
215  }
216  }
217 
218  return length;
219 }
void FindLineEnds(const LINE &aLine, JOINT &aA, JOINT &aB)
Destroy all child nodes. Applicable only to the root node.
Definition: pns_node.cpp:1013
NODE * m_world
Total length added by pad to die size.

References PNS::NODE::FindLineEnds(), PNS::JOINT::LinkList(), and PNS::MEANDER_PLACER_BASE::m_world.

◆ HasPlacedAnything()

bool PNS::MEANDER_PLACER::HasPlacedAnything ( ) const
overridevirtualinherited

Reimplemented from PNS::PLACEMENT_ALGO.

Definition at line 213 of file pns_meander_placer.cpp.

214 {
215  return m_currentTrace.SegmentCount() > 0;
216 }
int SegmentCount() const
Definition: pns_line.h:139

References PNS::MEANDER_PLACER::m_currentTrace, and PNS::LINE::SegmentCount().

◆ IsPlacingVia()

virtual bool PNS::PLACEMENT_ALGO::IsPlacingVia ( ) const
inlinevirtualinherited

Function IsPlacingVia()

Returns true if the placer is placing a via (or more vias).

Reimplemented in PNS::LINE_PLACER, and PNS::DIFF_PAIR_PLACER.

Definition at line 104 of file pns_placement_algo.h.

105  {
106  return false;
107  }

◆ lineLength()

long long int PNS::MEANDER_PLACER_BASE::lineLength ( const ITEM_SET aLine) const
protectedinherited

Calculate the total length of the line represented by an item set (tracks and vias)

Parameters
aLine@returnPointer to world to search colliding items.

Definition at line 264 of file pns_meander_placer_base.cpp.

265 {
266  long long int total = 0;
267 
268  for( int idx = 0; idx < aLine.Size(); idx++ )
269  {
270  const ITEM* item = aLine[idx];
271 
272  if( const LINE* l = dyn_cast<const LINE*>( item ) )
273  {
274  total += l->CLine().Length();
275  }
276  else if( item->OfKind( ITEM::VIA_T ) && idx > 0 && idx < aLine.Size() - 1 )
277  {
278  int layerPrev = aLine[idx - 1]->Layer();
279  int layerNext = aLine[idx + 1]->Layer();
280 
281  if( layerPrev != layerNext )
282  total += m_router->GetInterface()->StackupHeight( layerPrev, layerNext );
283  }
284  }
285 
286  return total;
287 }
ROUTER * m_router
Definition: pns_algo_base.h:87
virtual int StackupHeight(int aFirstLayer, int aSecondLayer) const =0
ROUTER_IFACE * GetInterface() const
Definition: pns_router.h:210

References PNS::ROUTER::GetInterface(), PNS::ALGO_BASE::m_router, PNS::ITEM::OfKind(), PNS::ITEM_SET::Size(), PNS::ROUTER_IFACE::StackupHeight(), and PNS::ITEM::VIA_T.

Referenced by origPathLength(), PNS::MEANDER_PLACER::origPathLength(), PNS::DP_MEANDER_PLACER::origPathLength(), and Start().

◆ Logger()

LOGGER * PNS::ALGO_BASE::Logger ( )
virtualinherited

Reimplemented in PNS::SHOVE.

Definition at line 34 of file pns_algo_base.cpp.

35 {
36  return NULL;
37 }
#define NULL

References NULL.

Referenced by PNS::LINE_PLACER::rhShoveOnly(), PNS::LINE_PLACER::rhWalkOnly(), PNS::DRAGGER::Start(), and PNS::DRAGGER::tryWalkaround().

◆ MeanderSettings()

const MEANDER_SETTINGS & PNS::MEANDER_PLACER_BASE::MeanderSettings ( ) const
virtualinherited

Return the current meandering configuration.

Returns
the settings

Definition at line 222 of file pns_meander_placer_base.cpp.

223 {
224  return m_settings;
225 }
MEANDER_SETTINGS m_settings
The current end point.

References PNS::MEANDER_PLACER_BASE::m_settings.

Referenced by PNS::MEANDER_SHAPE::makeMiterShape(), LENGTH_TUNER_TOOL::meanderSettingsDialog(), PNS::MEANDER_SHAPE::Settings(), and PNS::MEANDERED_LINE::Settings().

◆ Move()

bool PNS::MEANDER_SKEW_PLACER::Move ( const VECTOR2I aP,
ITEM aEndItem 
)
overridevirtual

Function Move()

Moves the end of the currently routed primtive(s) to the point aP, taking aEndItem as the anchor (if not NULL). (unless NULL).

Reimplemented from PNS::MEANDER_PLACER.

Definition at line 138 of file pns_meander_skew_placer.cpp.

139 {
140  for( const ITEM* item : m_tunedPathP.CItems() )
141  {
142  if( const LINE* l = dyn_cast<const LINE*>( item ) )
143  PNS_DBG( Dbg(), AddLine, l->CLine(), BLUE, 10000, "tuned-path-skew-p" );
144  }
145 
146  for( const ITEM* item : m_tunedPathN.CItems() )
147  {
148  if( const LINE* l = dyn_cast<const LINE*>( item ) )
149  PNS_DBG( Dbg(), AddLine, l->CLine(), YELLOW, 10000, "tuned-path-skew-n" );
150  }
151 
152  return doMove( aP, aEndItem, m_coupledLength + m_settings.m_targetSkew );
153 }
Definition: color4d.h:67
bool doMove(const VECTOR2I &aP, ITEM *aEndItem, long long int aTargetLength)
#define PNS_DBG(dbg, method,...)
DEBUG_DECORATOR * Dbg() const
Definition: pns_algo_base.h:78
Definition: color4d.h:56
MEANDER_SETTINGS m_settings
The current end point.
const ENTRIES & CItems() const
Definition: pns_itemset.h:139

References BLUE, PNS::ITEM_SET::CItems(), PNS::ALGO_BASE::Dbg(), PNS::MEANDER_PLACER::doMove(), m_coupledLength, PNS::MEANDER_PLACER_BASE::m_settings, PNS::MEANDER_SETTINGS::m_targetSkew, m_tunedPathN, m_tunedPathP, PNS_DBG, and YELLOW.

◆ origPathLength()

long long int PNS::MEANDER_SKEW_PLACER::origPathLength ( ) const
overrideprivatevirtual

current routing start point (end of tail, beginning of head)

Reimplemented from PNS::MEANDER_PLACER.

Definition at line 126 of file pns_meander_skew_placer.cpp.

127 {
128  return lineLength( m_tunedPath );
129 }
long long int lineLength(const ITEM_SET &aLine) const
Calculate the total length of the line represented by an item set (tracks and vias)

References PNS::MEANDER_PLACER_BASE::lineLength(), and m_tunedPath.

◆ Router()

◆ SetDebugDecorator()

void PNS::ALGO_BASE::SetDebugDecorator ( DEBUG_DECORATOR aDecorator)
inlineinherited

Assign a debug decorator allowing this algo to draw extra graphics for visual debugging.

Definition at line 73 of file pns_algo_base.h.

74  {
75  m_debugDecorator = aDecorator;
76  }
DEBUG_DECORATOR * m_debugDecorator
Definition: pns_algo_base.h:86

References PNS::ALGO_BASE::m_debugDecorator.

Referenced by PNS::LINE_PLACER::rhShoveOnly(), PNS::LINE_PLACER::rhWalkOnly(), PNS::SHOVE::SHOVE(), and PNS::DRAGGER::tryWalkaround().

◆ SetLayer()

virtual bool PNS::PLACEMENT_ALGO::SetLayer ( int  aLayer)
inlinevirtualinherited

Function SetLayer()

Sets the current routing layer.

Reimplemented in PNS::LINE_PLACER, and PNS::DIFF_PAIR_PLACER.

Definition at line 114 of file pns_placement_algo.h.

115  {
116  return false;
117  }

◆ SetLogger()

void PNS::ALGO_BASE::SetLogger ( LOGGER aLogger)
inlineinherited

Definition at line 65 of file pns_algo_base.h.

66  {
67  m_logger = aLogger;
68  }
LOGGER * m_logger
Definition: pns_algo_base.h:88

References PNS::ALGO_BASE::m_logger.

Referenced by PNS::LINE_PLACER::rhShoveOnly(), PNS::LINE_PLACER::rhWalkOnly(), and PNS::DRAGGER::tryWalkaround().

◆ SetOrthoMode()

virtual void PNS::PLACEMENT_ALGO::SetOrthoMode ( bool  aOrthoMode)
inlinevirtualinherited

Function SetOrthoMode()

Forces the router to place a straight 90/45 degree trace (with the end as near to the cursor as possible) instead of a standard 135 degree two-segment bend.

Reimplemented in PNS::LINE_PLACER, and PNS::DIFF_PAIR_PLACER.

Definition at line 182 of file pns_placement_algo.h.

183  {
184  }

◆ Settings()

◆ setWorld()

void PNS::MEANDER_PLACER::setWorld ( NODE aWorld)
protectedinherited

◆ SpacingStep()

void PNS::MEANDER_PLACER_BASE::SpacingStep ( int  aSign)
virtualinherited

Increase/decrease the current meandering spacing by one step.

Parameters
aSigndirection (negative = decrease, positive = increase).

Definition at line 53 of file pns_meander_placer_base.cpp.

54 {
55  int s = m_settings.m_spacing + aSign * m_settings.m_step;
56  s = std::max( s, 2 * m_currentWidth );
57 
59 }
int m_currentWidth
Meander settings.
int m_step
Length PadToDie.
Definition: pns_meander.h:82
MEANDER_SETTINGS m_settings
The current end point.
int m_spacing
Amplitude/spacing adjustment step.
Definition: pns_meander.h:80

References PNS::MEANDER_PLACER_BASE::m_currentWidth, PNS::MEANDER_PLACER_BASE::m_settings, PNS::MEANDER_SETTINGS::m_spacing, and PNS::MEANDER_SETTINGS::m_step.

◆ Start()

bool PNS::MEANDER_SKEW_PLACER::Start ( const VECTOR2I aP,
ITEM aStartItem 
)
overridevirtual

Function Start()

Starts placement/drag operation at point aP, taking item aStartItem as anchor (unless NULL).

Reimplemented from PNS::MEANDER_PLACER.

Definition at line 50 of file pns_meander_skew_placer.cpp.

51 {
52  if( !aStartItem || !aStartItem->OfKind( ITEM::SEGMENT_T | ITEM::ARC_T) )
53  {
54  Router()->SetFailureReason( _( "Please select a differential pair trace you want to tune." ) );
55  return false;
56  }
57 
58  m_initialSegment = static_cast<LINKED_ITEM*>( aStartItem );
59  m_currentNode = nullptr;
61 
62  m_world = Router()->GetWorld( )->Branch();
64 
65  TOPOLOGY topo( m_world );
66  m_tunedPath = topo.AssembleTrivialPath( m_initialSegment );
67 
68  if( !topo.AssembleDiffPair ( m_initialSegment, m_originPair ) )
69  {
70  Router()->SetFailureReason( _( "Unable to find complementary differential pair "
71  "net for skew tuning. Make sure the names of the nets belonging "
72  "to a differential pair end with either _N/_P or +/-." ) );
73  return false;
74  }
75 
76  if( m_originPair.Gap() < 0 )
77  m_originPair.SetGap( Router()->Sizes().DiffPairGap() );
78 
79  if( !m_originPair.PLine().SegmentCount() ||
81  return false;
82 
83  SOLID* padA = nullptr;
84  SOLID* padB = nullptr;
85 
86  m_tunedPathP = topo.AssembleTuningPath( m_originPair.PLine().GetLink( 0 ), &padA, &padB );
87 
88  m_padToDieP = 0;
89 
90  if( padA )
91  m_padToDieP += padA->GetPadToDie();
92 
93  if( padB )
94  m_padToDieP += padB->GetPadToDie();
95 
96  m_tunedPathN = topo.AssembleTuningPath( m_originPair.NLine().GetLink( 0 ), &padA, &padB );
97 
98  m_padToDieN = 0;
99 
100  if( padA )
101  m_padToDieN += padA->GetPadToDie();
102 
103  if( padB )
104  m_padToDieN += padB->GetPadToDie();
105 
107 
109  m_currentEnd = VECTOR2I( 0, 0 );
110 
111  if ( m_originPair.PLine().Net() == m_originLine.Net() )
112  {
115  }
116  else
117  {
120  }
121 
122  return true;
123 }
ROUTER * Router() const
Return current router settings.
Definition: pns_algo_base.h:54
int Gap() const
int SegmentCount() const
Definition: pns_line.h:139
LINKED_ITEM * m_initialSegment
VECTOR2< int > VECTOR2I
Definition: vector2d.h:623
NODE * Branch()
Create a lightweight copy (called branch) of self that tracks the changes (added/removed items) wrs t...
Definition: pns_node.cpp:127
int m_currentWidth
Meander settings.
void Remove(ARC *aArc)
Remove an item from this branch.
Definition: pns_node.cpp:810
int m_padToDieLength
Width of the meandered trace(s).
void SetGap(int aGap)
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.
Definition: pns_node.cpp:920
int Net() const
Definition: pns_item.h:150
long long int lineLength(const ITEM_SET &aLine) const
Calculate the total length of the line represented by an item set (tracks and vias)
NODE * m_world
Total length added by pad to die size.
void SetFailureReason(const wxString &aReason)
Definition: pns_router.h:205
#define _(s)
VECTOR2I getSnappedStartPoint(LINKED_ITEM *aStartItem, VECTOR2I aStartPoint)
VECTOR2I m_currentStart
Current world state.
int Width() const
Return true if the line is geometrically identical as line aOther.
Definition: pns_line.h:156
NODE * GetWorld() const
Definition: pns_router.h:153

References _, PNS::ITEM::ARC_T, PNS::TOPOLOGY::AssembleDiffPair(), PNS::NODE::AssembleLine(), PNS::TOPOLOGY::AssembleTrivialPath(), PNS::TOPOLOGY::AssembleTuningPath(), PNS::NODE::Branch(), PNS::DIFF_PAIR::Gap(), PNS::LINK_HOLDER::GetLink(), PNS::SOLID::GetPadToDie(), PNS::MEANDER_PLACER_BASE::getSnappedStartPoint(), PNS::ROUTER::GetWorld(), PNS::MEANDER_PLACER_BASE::lineLength(), m_coupledLength, PNS::MEANDER_PLACER_BASE::m_currentEnd, PNS::MEANDER_PLACER::m_currentNode, PNS::MEANDER_PLACER::m_currentStart, PNS::MEANDER_PLACER_BASE::m_currentWidth, PNS::MEANDER_PLACER::m_initialSegment, PNS::MEANDER_PLACER::m_originLine, m_originPair, PNS::MEANDER_PLACER_BASE::m_padToDieLength, m_padToDieN, m_padToDieP, m_tunedPath, m_tunedPathN, m_tunedPathP, PNS::MEANDER_PLACER_BASE::m_world, PNS::ITEM::Net(), PNS::DIFF_PAIR::NLine(), PNS::ITEM::OfKind(), PNS::DIFF_PAIR::PLine(), PNS::NODE::Remove(), PNS::ALGO_BASE::Router(), PNS::ITEM::SEGMENT_T, PNS::LINE::SegmentCount(), PNS::ROUTER::SetFailureReason(), PNS::DIFF_PAIR::SetGap(), and PNS::LINE::Width().

◆ ToggleVia()

virtual bool PNS::PLACEMENT_ALGO::ToggleVia ( bool  aEnabled)
inlinevirtualinherited

Function ToggleVia()

Enables/disables a via at the end of currently routed trace.

Reimplemented in PNS::LINE_PLACER, and PNS::DIFF_PAIR_PLACER.

Definition at line 94 of file pns_placement_algo.h.

95  {
96  return false;
97  }

◆ Traces()

const ITEM_SET PNS::MEANDER_PLACER::Traces ( )
overridevirtualinherited

Function Traces()

Returns all routed/tuned traces.

Implements PNS::PLACEMENT_ALGO.

Definition at line 243 of file pns_meander_placer.cpp.

References PNS::MEANDER_PLACER::m_currentTrace, PNS::MEANDER_PLACER::m_finalShape, and PNS::MEANDER_PLACER::m_originLine.

◆ tuneLineLength()

void PNS::MEANDER_PLACER_BASE::tuneLineLength ( MEANDERED_LINE aTuned,
long long int  aElongation 
)
protectedinherited

Take a set of meanders in aTuned and tunes their length to extend the original line length by aElongation.

Definition at line 114 of file pns_meander_placer_base.cpp.

115 {
116  long long int remaining = aElongation;
117  bool finished = false;
118 
119  for( MEANDER_SHAPE* m : aTuned.Meanders() )
120  {
121  if( m->Type() != MT_CORNER )
122  {
123  if( remaining >= 0 )
124  remaining -= m->MaxTunableLength() - m->BaselineLength();
125 
126  if( remaining < 0 )
127  {
128  if( !finished )
129  {
130  MEANDER_TYPE newType;
131 
132  if( m->Type() == MT_START || m->Type() == MT_SINGLE )
133  newType = MT_SINGLE;
134  else
135  newType = MT_FINISH;
136 
137  m->SetType( newType );
138  m->Recalculate();
139 
140  finished = true;
141  }
142  else
143  {
144  m->MakeEmpty();
145  }
146  }
147  }
148  }
149 
150  remaining = aElongation;
151  int meanderCount = 0;
152 
153  for( MEANDER_SHAPE* m : aTuned.Meanders() )
154  {
155  if( m->Type() != MT_CORNER && m->Type() != MT_EMPTY )
156  {
157  if(remaining >= 0)
158  {
159  remaining -= m->MaxTunableLength() - m->BaselineLength();
160  meanderCount ++;
161  }
162  }
163  }
164 
165  long long int balance = 0;
166 
167  if( meanderCount )
168  balance = -remaining / meanderCount;
169 
170  if( balance >= 0 )
171  {
172  for( MEANDER_SHAPE* m : aTuned.Meanders() )
173  {
174  if( m->Type() != MT_CORNER && m->Type() != MT_EMPTY )
175  {
176  m->Resize( std::max( m->Amplitude() - balance / 2,
177  (long long int) m_settings.m_minAmplitude ) );
178  }
179  }
180  }
181 }
int m_minAmplitude
Maximum meandering amplitude.
Definition: pns_meander.h:76
MEANDER_TYPE
Shapes of available meanders.
Definition: pns_meander.h:37
MEANDER_SETTINGS m_settings
The current end point.

References PNS::MEANDER_SETTINGS::m_minAmplitude, PNS::MEANDER_PLACER_BASE::m_settings, PNS::MEANDERED_LINE::Meanders(), PNS::MT_CORNER, PNS::MT_EMPTY, PNS::MT_FINISH, PNS::MT_SINGLE, and PNS::MT_START.

Referenced by PNS::MEANDER_PLACER::doMove(), and PNS::DP_MEANDER_PLACER::Move().

◆ TuningInfo()

const wxString PNS::MEANDER_SKEW_PLACER::TuningInfo ( EDA_UNITS  aUnits) const
overridevirtual

Return a string describing the status and length of the tuned traces.

Reimplemented from PNS::MEANDER_PLACER.

Definition at line 156 of file pns_meander_skew_placer.cpp.

157 {
158  wxString status;
159 
160  switch( m_lastStatus )
161  {
162  case TOO_LONG:
163  status = _( "Too long: skew " );
164  break;
165  case TOO_SHORT:
166  status = _( "Too short: skew " );
167  break;
168  case TUNED:
169  status = _( "Tuned: skew " );
170  break;
171  default:
172  return _( "?" );
173  }
174 
175  status += ::MessageTextFromValue( aUnits, m_lastLength - m_coupledLength );
176  status += "/";
177  status += ::MessageTextFromValue( aUnits, m_settings.m_targetSkew );
178 
179  return status;
180 }
wxString MessageTextFromValue(EDA_UNITS aUnits, int aValue, bool aAddUnitLabel, EDA_DATA_TYPE aType)
Convert a value to a string using double notation.
Definition: base_units.cpp:103
TUNING_STATUS m_lastStatus
long long int m_lastLength
#define _(s)
MEANDER_SETTINGS m_settings
The current end point.

References _, m_coupledLength, PNS::MEANDER_PLACER::m_lastLength, PNS::MEANDER_PLACER::m_lastStatus, PNS::MEANDER_PLACER_BASE::m_settings, PNS::MEANDER_SETTINGS::m_targetSkew, MessageTextFromValue(), PNS::MEANDER_PLACER_BASE::TOO_LONG, PNS::MEANDER_PLACER_BASE::TOO_SHORT, and PNS::MEANDER_PLACER_BASE::TUNED.

◆ TuningStatus()

MEANDER_PLACER::TUNING_STATUS PNS::MEANDER_PLACER::TuningStatus ( ) const
overridevirtualinherited

Return the tuning status (too short, too long, etc.) of the trace(s) being tuned.

Implements PNS::MEANDER_PLACER_BASE.

Definition at line 288 of file pns_meander_placer.cpp.

289 {
290  return m_lastStatus;
291 }
TUNING_STATUS m_lastStatus

References PNS::MEANDER_PLACER::m_lastStatus.

◆ UnfixRoute()

virtual bool PNS::PLACEMENT_ALGO::UnfixRoute ( )
inlinevirtualinherited

Reimplemented in PNS::LINE_PLACER.

Definition at line 81 of file pns_placement_algo.h.

81 { return false; };

◆ UpdateSettings()

void PNS::MEANDER_PLACER_BASE::UpdateSettings ( const MEANDER_SETTINGS aSettings)
virtualinherited

Definition at line 62 of file pns_meander_placer_base.cpp.

63 {
64  m_settings = aSettings;
65 }
MEANDER_SETTINGS m_settings
The current end point.

References PNS::MEANDER_PLACER_BASE::m_settings.

Referenced by LENGTH_TUNER_TOOL::meanderSettingsDialog().

◆ UpdateSizes()

virtual void PNS::PLACEMENT_ALGO::UpdateSizes ( const SIZES_SETTINGS aSizes)
inlinevirtualinherited

Function UpdateSizes()

Performs on-the-fly update of the width, via diameter & drill size from a settings class. Used to dynamically change these parameters as the track is routed.

Reimplemented in PNS::LINE_PLACER, and PNS::DIFF_PAIR_PLACER.

Definition at line 171 of file pns_placement_algo.h.

172  {
173  }

◆ VisibleViewArea()

const BOX2I & PNS::ALGO_BASE::VisibleViewArea ( ) const
inherited

Definition at line 39 of file pns_algo_base.cpp.

40 {
41  return m_router->VisibleViewArea();
42 }
ROUTER * m_router
Definition: pns_algo_base.h:87
const BOX2I & VisibleViewArea() const
Definition: pns_router.h:220

References PNS::ALGO_BASE::m_router, and PNS::ROUTER::VisibleViewArea().

Referenced by PNS::DRAGGER::optimizeAndUpdateDraggedLine(), and PNS::SHOVE::runOptimizer().

Member Data Documentation

◆ m_coupledLength

long long int PNS::MEANDER_SKEW_PLACER::m_coupledLength
private

Definition at line 62 of file pns_meander_skew_placer.h.

Referenced by currentSkew(), MEANDER_SKEW_PLACER(), Move(), Start(), and TuningInfo().

◆ m_currentEnd

VECTOR2I PNS::MEANDER_PLACER_BASE::m_currentEnd
protectedinherited

◆ m_currentNode

◆ m_currentStart

VECTOR2I PNS::MEANDER_PLACER::m_currentStart
protectedinherited

Current world state.

Definition at line 105 of file pns_meander_placer.h.

Referenced by PNS::MEANDER_PLACER::doMove(), Start(), and PNS::MEANDER_PLACER::Start().

◆ m_currentTrace

LINE PNS::MEANDER_PLACER::m_currentTrace
protectedinherited

◆ m_currentWidth

int PNS::MEANDER_PLACER_BASE::m_currentWidth
protectedinherited

◆ m_debugDecorator

DEBUG_DECORATOR* PNS::ALGO_BASE::m_debugDecorator
protectedinherited

Definition at line 86 of file pns_algo_base.h.

Referenced by PNS::ALGO_BASE::Dbg(), and PNS::ALGO_BASE::SetDebugDecorator().

◆ m_finalShape

SHAPE_LINE_CHAIN PNS::MEANDER_PLACER::m_finalShape
protectedinherited

◆ m_initialSegment

LINKED_ITEM* PNS::MEANDER_PLACER::m_initialSegment
protectedinherited

◆ m_lastLength

long long int PNS::MEANDER_PLACER::m_lastLength
protectedinherited

◆ m_lastStatus

◆ m_logger

LOGGER* PNS::ALGO_BASE::m_logger
protectedinherited

Definition at line 88 of file pns_algo_base.h.

Referenced by PNS::ALGO_BASE::SetLogger().

◆ m_originLine

◆ m_originPair

DIFF_PAIR PNS::MEANDER_SKEW_PLACER::m_originPair
private

Definition at line 59 of file pns_meander_skew_placer.h.

Referenced by Start().

◆ m_padToDieLength

int PNS::MEANDER_PLACER_BASE::m_padToDieLength
protectedinherited

◆ m_padToDieN

int PNS::MEANDER_SKEW_PLACER::m_padToDieN
private

Definition at line 64 of file pns_meander_skew_placer.h.

Referenced by MEANDER_SKEW_PLACER(), and Start().

◆ m_padToDieP

int PNS::MEANDER_SKEW_PLACER::m_padToDieP
private

Definition at line 63 of file pns_meander_skew_placer.h.

Referenced by MEANDER_SKEW_PLACER(), and Start().

◆ m_result

MEANDERED_LINE PNS::MEANDER_PLACER::m_result
protectedinherited

◆ m_router

◆ m_settings

◆ m_tunedPath

ITEM_SET PNS::MEANDER_SKEW_PLACER::m_tunedPath
private

Definition at line 60 of file pns_meander_skew_placer.h.

Referenced by origPathLength(), and Start().

◆ m_tunedPathN

ITEM_SET PNS::MEANDER_SKEW_PLACER::m_tunedPathN
private

Definition at line 60 of file pns_meander_skew_placer.h.

Referenced by Move(), and Start().

◆ m_tunedPathP

ITEM_SET PNS::MEANDER_SKEW_PLACER::m_tunedPathP
private

Definition at line 60 of file pns_meander_skew_placer.h.

Referenced by Move(), and Start().

◆ m_world


The documentation for this class was generated from the following files: