KiCad PCB EDA Suite
PNS::DP_MEANDER_PLACER Class Reference

DP_MEANDER_PLACER. More...

#include <pns_dp_meander_placer.h>

Inheritance diagram for PNS::DP_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

 DP_MEANDER_PLACER (ROUTER *aRouter)
 
 ~DP_MEANDER_PLACER ()
 
bool Start (const VECTOR2I &aP, ITEM *aStartItem) override
 Function Start() More...
 
bool Move (const VECTOR2I &aP, ITEM *aEndItem) override
 Function Move() More...
 
bool FixRoute (const VECTOR2I &aP, ITEM *aEndItem, bool aForceFinish=false) override
 Function FixRoute() More...
 
bool CommitPlacement () override
 
bool AbortPlacement () override
 
bool HasPlacedAnything () const override
 
const LINE Trace () const
 
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...
 
long long int totalLength ()
 
const wxString TuningInfo (EDA_UNITS aUnits) const override
 Function TuningInfo() More...
 
TUNING_STATUS TuningStatus () const override
 Function TuningStatus() More...
 
bool CheckFit (MEANDER_SHAPE *aShape) override
 Function CheckFit() More...
 
virtual void AmplitudeStep (int aSign)
 Function AmplitudeStep() More...
 
virtual void SpacingStep (int aSign)
 Function SpacingStep() More...
 
virtual const MEANDER_SETTINGSMeanderSettings () const
 Function MeanderSettings() 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
 

Returns the instance of our router

More...
 
ROUTING_SETTINGSSettings () const
 

Returns current router settings

More...
 
virtual LOGGERLogger ()
 

Returns the logger object, allowing to dump geometry to a file.

More...
 
void SetLogger (LOGGER *aLogger)
 
void SetDebugDecorator (DEBUG_DECORATOR *aDecorator)
 Function SetDebugDecorator. More...
 
DEBUG_DECORATORDbg () const
 

Protected Member Functions

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)
 Function cutTunedLine() More...
 
void tuneLineLength (MEANDERED_LINE &aTuned, long long int aElongation)
 Function tuneLineLength() More...
 
int compareWithTolerance (long long int aValue, long long int aExpected, long long int aTolerance=0) const
 Function compareWithTolerance() More...
 

Protected Attributes

NODEm_world
 

pointer to world to search colliding items

More...
 
int m_padToDieLenth
 

total length added by pad to die size

More...
 
int m_currentWidth
 

width of the meandered trace(s)

More...
 
MEANDER_SETTINGS m_settings
 

meandering settings

More...
 
VECTOR2I m_currentEnd
 

current end point

More...
 
DEBUG_DECORATORm_debugDecorator
 
ROUTERm_router
 
LOGGERm_logger
 

Private Member Functions

void meanderSegment (const SEG &aBase)
 
const SEG baselineSegment (const DIFF_PAIR::COUPLED_SEGMENTS &aCoupledSegs)
 
bool pairOrientation (const DIFF_PAIR::COUPLED_SEGMENTS &aPair)
 
void setWorld (NODE *aWorld)
 
void release ()
 
long long int origPathLength () const
 

Private Attributes

VECTOR2I m_currentStart
 

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

More...
 
NODEm_currentNode
 

Current world state

More...
 
DIFF_PAIR m_originPair
 
DIFF_PAIR::COUPLED_SEGMENTS_VEC m_coupledSegments
 
LINE m_currentTraceN
 
LINE m_currentTraceP
 
ITEM_SET m_tunedPath
 
ITEM_SET m_tunedPathP
 
ITEM_SET m_tunedPathN
 
SHAPE_LINE_CHAIN m_finalShapeP
 
SHAPE_LINE_CHAIN m_finalShapeN
 
MEANDERED_LINE m_result
 
SEGMENTm_initialSegment
 
long long int m_lastLength
 
int m_padToDieP
 
int m_padToDieN
 
TUNING_STATUS m_lastStatus
 

Friends

class MEANDER_SHAPE
 

Detailed Description

DP_MEANDER_PLACER.

Differential Pair length-matching/meandering tool.

Definition at line 49 of file pns_dp_meander_placer.h.

Member Enumeration Documentation

◆ TUNING_STATUS

Result of the length tuning operation

Enumerator
TOO_SHORT 
TOO_LONG 
TUNED 

Definition at line 52 of file pns_meander_placer_base.h.

Constructor & Destructor Documentation

◆ DP_MEANDER_PLACER()

PNS::DP_MEANDER_PLACER::DP_MEANDER_PLACER ( ROUTER aRouter)

Definition at line 36 of file pns_dp_meander_placer.cpp.

36  :
37  MEANDER_PLACER_BASE( aRouter )
38 {
39  m_world = NULL;
41 
42  m_padToDieP = 0;
43  m_padToDieN = 0;
44 
45  // Init temporary variables (do not leave uninitialized members)
47  m_lastLength = 0;
49 }
NODE * m_currentNode
Current world state
#define NULL
NODE * m_world
pointer to world to search colliding items

References m_currentNode, m_initialSegment, m_lastLength, m_lastStatus, m_padToDieN, m_padToDieP, PNS::MEANDER_PLACER_BASE::m_world, NULL, and PNS::MEANDER_PLACER_BASE::TOO_SHORT.

◆ ~DP_MEANDER_PLACER()

PNS::DP_MEANDER_PLACER::~DP_MEANDER_PLACER ( )

Definition at line 52 of file pns_dp_meander_placer.cpp.

53 {
54 }

Member Function Documentation

◆ AbortPlacement()

bool PNS::DP_MEANDER_PLACER::AbortPlacement ( )
overridevirtual

Reimplemented from PNS::PLACEMENT_ALGO.

Definition at line 324 of file pns_dp_meander_placer.cpp.

325 {
327  return true;
328 }
void KillChildren()
Destroys all child nodes. Applicable only to the root node.
Definition: pns_node.cpp:1288
NODE * m_world
pointer to world to search colliding items

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

◆ AmplitudeStep()

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

Function AmplitudeStep()

Increases/decreases the current meandering amplitude by one step.

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

Definition at line 43 of file pns_meander_placer_base.cpp.

44 {
45  int a = m_settings.m_maxAmplitude + aSign * m_settings.m_step;
46  a = std::max( a, m_settings.m_minAmplitude );
47 
49 }
int m_minAmplitude
minimum meandering amplitude
Definition: pns_meander.h:77
int m_step
amplitude/spacing adjustment step
Definition: pns_meander.h:83
MEANDER_SETTINGS m_settings
meandering settings
int m_maxAmplitude
maximum meandering amplitude
Definition: pns_meander.h:79

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

◆ baselineSegment()

const SEG PNS::DP_MEANDER_PLACER::baselineSegment ( const DIFF_PAIR::COUPLED_SEGMENTS aCoupledSegs)
private

Definition at line 151 of file pns_dp_meander_placer.cpp.

152 {
153  const VECTOR2I a( ( aCoupledSegs.coupledP.A + aCoupledSegs.coupledN.A ) / 2 );
154  const VECTOR2I b( ( aCoupledSegs.coupledP.B + aCoupledSegs.coupledN.B ) / 2 );
155 
156  return SEG( a, b );
157 }
Definition: seg.h:39

References SEG::A, SEG::B, PNS::DIFF_PAIR::COUPLED_SEGMENTS::coupledN, and PNS::DIFF_PAIR::COUPLED_SEGMENTS::coupledP.

Referenced by Move().

◆ CheckFit()

bool PNS::DP_MEANDER_PLACER::CheckFit ( MEANDER_SHAPE aShape)
overridevirtual

Function CheckFit()

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 348 of file pns_dp_meander_placer.cpp.

349 {
350  LINE l1( m_originPair.PLine(), aShape->CLine( 0 ) );
351  LINE l2( m_originPair.NLine(), aShape->CLine( 1 ) );
352 
353  if( m_currentNode->CheckColliding( &l1 ) )
354  return false;
355 
356  if( m_currentNode->CheckColliding( &l2 ) )
357  return false;
358 
359  int w = aShape->Width();
360  int clearance = w + m_settings.m_spacing;
361 
362  return m_result.CheckSelfIntersections( aShape, clearance );
363 }
const SHAPE_LINE_CHAIN & CLine() const
Const accessor to the underlying shape
Definition: pns_line.h:144
bool CheckSelfIntersections(MEANDER_SHAPE *aShape, int aClearance)
Function CheckSelfIntersections()
NODE * m_currentNode
Current world state
MEANDER_SETTINGS m_settings
meandering settings
OPT_OBSTACLE CheckColliding(const ITEM *aItem, int aKindMask=ITEM::ANY_T)
Function CheckColliding()
Definition: pns_node.cpp:427
int m_spacing
meandering period/spacing (see dialog picture for explanation)
Definition: pns_meander.h:81

References PNS::NODE::CheckColliding(), PNS::MEANDERED_LINE::CheckSelfIntersections(), PNS::MEANDER_SHAPE::CLine(), m_currentNode, m_originPair, m_result, PNS::MEANDER_PLACER_BASE::m_settings, PNS::MEANDER_SETTINGS::m_spacing, PNS::DIFF_PAIR::NLine(), PNS::DIFF_PAIR::PLine(), and PNS::MEANDER_SHAPE::Width().

◆ CommitPlacement()

bool PNS::DP_MEANDER_PLACER::CommitPlacement ( )
overridevirtual

Reimplemented from PNS::PLACEMENT_ALGO.

Definition at line 338 of file pns_dp_meander_placer.cpp.

339 {
340  if( m_currentNode )
342 
344  return true;
345 }
ROUTER * Router() const
Returns the instance of our router
Definition: pns_algo_base.h:51
void CommitRouting()
Definition: pns_router.cpp:422
NODE * m_currentNode
Current world state
#define NULL

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

Referenced by FixRoute().

◆ compareWithTolerance()

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

Function compareWithTolerance()

Compares aValue against aExpected with given tolerance.

Definition at line 224 of file pns_meander_placer_base.cpp.

226 {
227  if( aValue < aExpected - aTolerance )
228  return -1;
229  else if( aValue > aExpected + aTolerance )
230  return 1;
231  else
232  return 0;
233 }

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

◆ CurrentEnd()

const VECTOR2I & PNS::DP_MEANDER_PLACER::CurrentEnd ( ) const
overridevirtual

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 380 of file pns_dp_meander_placer.cpp.

381 {
382  return m_currentEnd;
383 }
VECTOR2I m_currentEnd
current end point

References PNS::MEANDER_PLACER_BASE::m_currentEnd.

◆ CurrentLayer()

int PNS::DP_MEANDER_PLACER::CurrentLayer ( ) const
overridevirtual

Function CurrentLayer()

Returns the layer of currently routed track.

Implements PNS::PLACEMENT_ALGO.

Definition at line 386 of file pns_dp_meander_placer.cpp.

387 {
388  return m_initialSegment->Layers().Start();
389 }
int Start() const
Definition: pns_layerset.h:83
const LAYER_RANGE & Layers() const
Definition: pns_item.h:151

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

◆ CurrentNets()

const std::vector< int > PNS::DP_MEANDER_PLACER::CurrentNets ( ) const
overridevirtual

Function CurrentNets()

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

Implements PNS::PLACEMENT_ALGO.

Definition at line 427 of file pns_dp_meander_placer.cpp.

428 {
429  std::vector<int> rv;
430  rv.push_back( m_originPair.NetP() );
431  rv.push_back( m_originPair.NetN() );
432  return rv;
433 }
int NetP() const
int NetN() const

References m_originPair, PNS::DIFF_PAIR::NetN(), and PNS::DIFF_PAIR::NetP().

◆ CurrentNode()

NODE * PNS::DP_MEANDER_PLACER::CurrentNode ( bool  aLoopsRemoved = false) const
overridevirtual

Function CurrentNode()

Returns the most recent world state.

Implements PNS::PLACEMENT_ALGO.

Definition at line 63 of file pns_dp_meander_placer.cpp.

64 {
65  if( !m_currentNode )
66  return m_world;
67 
68  return m_currentNode;
69 }
NODE * m_currentNode
Current world state
NODE * m_world
pointer to world to search colliding items

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

◆ 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

Function cutTunedLine()

Extracts 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 coorinates)
aCursorPoscurrent cursor position
aPrepart before the beginning of meanders
aTunedpart to be meandered
aPostpart after the end of meanders

Definition at line 67 of file pns_meander_placer_base.cpp.

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

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 Move().

◆ Dbg()

◆ FixRoute()

bool PNS::DP_MEANDER_PLACER::FixRoute ( const VECTOR2I aP,
ITEM aEndItem,
bool  aForceFinish = false 
)
overridevirtual

Function FixRoute()

Commits the currently routed track 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 commited. 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 310 of file pns_dp_meander_placer.cpp.

311 {
314 
315  m_currentNode->Add( lP );
316  m_currentNode->Add( lN );
317 
318  CommitPlacement();
319 
320  return true;
321 }
NODE * m_currentNode
Current world state
bool Add(std::unique_ptr< SEGMENT > aSegment, bool aAllowRedundant=false)
Function Add()
Definition: pns_node.cpp:620

References PNS::NODE::Add(), CommitPlacement(), m_currentNode, m_finalShapeN, m_finalShapeP, m_originPair, PNS::DIFF_PAIR::NLine(), and PNS::DIFF_PAIR::PLine().

◆ 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  }

◆ GetTotalPadToDieLength()

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

Definition at line 180 of file pns_meander_placer_base.cpp.

181 {
182  int length = 0;
183  JOINT start;
184  JOINT end;
185 
186  m_world->FindLineEnds( aLine, start, end );
187 
188  // Extract the length of the pad to die for start and end pads
189  for( auto& link : start.LinkList() )
190  {
191  if( const SOLID* solid = dynamic_cast<const SOLID*>( link.item ) )
192  {
193  // If there are overlapping pads, choose the first with a non-zero length
194  if( solid->GetPadToDie() > 0 )
195  {
196  length += solid->GetPadToDie();
197  break;
198  }
199  }
200  }
201 
202  for( auto& link : end.LinkList() )
203  {
204  if( const SOLID* solid = dynamic_cast<const SOLID*>( link.item ) )
205  {
206  if( solid->GetPadToDie() > 0 )
207  {
208  length += solid->GetPadToDie();
209  break;
210  }
211  }
212  }
213 
214  return length;
215 }
void FindLineEnds(const LINE &aLine, JOINT &aA, JOINT &aB)
finds the joints corresponding to the ends of line aLine
Definition: pns_node.cpp:948
NODE * m_world
pointer to world to search colliding items

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

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

◆ HasPlacedAnything()

bool PNS::DP_MEANDER_PLACER::HasPlacedAnything ( ) const
overridevirtual

Reimplemented from PNS::PLACEMENT_ALGO.

Definition at line 331 of file pns_dp_meander_placer.cpp.

332 {
333  return m_originPair.CP().SegmentCount() > 0 ||
334  m_originPair.CN().SegmentCount() > 0;
335 }
const SHAPE_LINE_CHAIN & CN() const
int SegmentCount() const
Function SegmentCount()
const SHAPE_LINE_CHAIN & CP() const

References PNS::DIFF_PAIR::CN(), PNS::DIFF_PAIR::CP(), m_originPair, and SHAPE_LINE_CHAIN::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  }

◆ Logger()

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

Returns the logger object, allowing to dump geometry to a file.

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::DRAGGER::dragWalkaround(), PNS::LINE_PLACER::rhShoveOnly(), PNS::LINE_PLACER::rhWalkOnly(), and PNS::DRAGGER::Start().

◆ meanderSegment()

void PNS::DP_MEANDER_PLACER::meanderSegment ( const SEG aBase)
private

◆ MeanderSettings()

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

Function MeanderSettings()

Returns the current meandering configuration.

Returns
the settings

Definition at line 218 of file pns_meander_placer_base.cpp.

219 {
220  return m_settings;
221 }
MEANDER_SETTINGS m_settings
meandering settings

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::DP_MEANDER_PLACER::Move ( const VECTOR2I aP,
ITEM aEndItem 
)
overridevirtual

Function Move()

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

Implements PNS::PLACEMENT_ALGO.

Definition at line 170 of file pns_dp_meander_placer.cpp.

171 {
172 // return false;
173 
174  DIFF_PAIR::COUPLED_SEGMENTS_VEC coupledSegments;
175 
176  if( m_currentNode )
177  delete m_currentNode;
178 
180 
181  SHAPE_LINE_CHAIN preP, tunedP, postP;
182  SHAPE_LINE_CHAIN preN, tunedN, postN;
183 
184  cutTunedLine( m_originPair.CP(), m_currentStart, aP, preP, tunedP, postP );
185  cutTunedLine( m_originPair.CN(), m_currentStart, aP, preN, tunedN, postN );
186 
187  DIFF_PAIR tuned( m_originPair );
188 
189  tuned.SetShape( tunedP, tunedN );
190 
191  tuned.CoupledSegmentPairs( coupledSegments );
192 
193  if( coupledSegments.size() == 0 )
194  return false;
195 
196  //Router()->DisplayDebugLine( tuned.CP(), 5, 20000 );
197  //Router()->DisplayDebugLine( tuned.CN(), 4, 20000 );
198 
199  //Router()->DisplayDebugLine( m_originPair.CP(), 5, 20000 );
200  //Router()->DisplayDebugLine( m_originPair.CN(), 4, 20000 );
201 
202  m_result = MEANDERED_LINE( this, true );
203  m_result.SetWidth( tuned.Width() );
204 
205  int offset = ( tuned.Gap() + tuned.Width() ) / 2;
206 
207  if( pairOrientation( coupledSegments[0] ) )
208  offset *= -1;
209 
210  m_result.SetBaselineOffset( offset );
211 
212  for( const ITEM* item : m_tunedPathP.CItems() )
213  {
214  if( const LINE* l = dyn_cast<const LINE*>( item ) )
215  Dbg()->AddLine( l->CLine(), 5, 10000 );
216  }
217 
218  for( const ITEM* item : m_tunedPathN.CItems() )
219  {
220  if( const LINE* l = dyn_cast<const LINE*>( item ) )
221  Dbg()->AddLine( l->CLine(), 5, 10000 );
222  }
223 
224  int curIndexP = 0, curIndexN = 0;
225 
226  for( const DIFF_PAIR::COUPLED_SEGMENTS& sp : coupledSegments )
227  {
228  SEG base = baselineSegment( sp );
229 
230  Dbg()->AddSegment( base, 3 );
231 
232  while( sp.indexP >= curIndexP )
233  {
234  m_result.AddCorner( tunedP.CPoint( curIndexP ), tunedN.CPoint( curIndexN ) );
235  curIndexP++;
236  }
237 
238  while( sp.indexN >= curIndexN )
239  {
240  m_result.AddCorner( tunedP.CPoint( sp.indexP ), tunedN.CPoint( curIndexN ) );
241  curIndexN++;
242  }
243 
244  m_result.MeanderSegment( base );
245  }
246 
247  while( curIndexP < tunedP.PointCount() )
248  m_result.AddCorner( tunedP.CPoint( curIndexP++ ), tunedN.CPoint( curIndexN ) );
249 
250  while( curIndexN < tunedN.PointCount() )
251  m_result.AddCorner( tunedP.CPoint( -1 ), tunedN.CPoint( curIndexN++ ) );
252 
253  long long int dpLen = origPathLength();
254 
256 
258  {
260  m_lastLength = dpLen;
261  }
262  else
263  {
264  m_lastLength = dpLen - std::max( tunedP.Length(), tunedN.Length() );
266  }
267 
268  if( m_lastStatus != TOO_LONG )
269  {
270  tunedP.Clear();
271  tunedN.Clear();
272 
273  for( MEANDER_SHAPE* m : m_result.Meanders() )
274  {
275  if( m->Type() != MT_EMPTY )
276  {
277  tunedP.Append( m->CLine( 0 ) );
278  tunedN.Append( m->CLine( 1 ) );
279  }
280  }
281 
282  m_lastLength += std::max( tunedP.Length(), tunedN.Length() );
283 
285 
286  if( comp > 0 )
288  else if( comp < 0 )
290  else
292  }
293 
295  m_finalShapeP.Append( preP );
296  m_finalShapeP.Append( tunedP );
297  m_finalShapeP.Append( postP );
299 
301  m_finalShapeN.Append( preN );
302  m_finalShapeN.Append( tunedN );
303  m_finalShapeN.Append( postN );
305 
306  return true;
307 }
virtual void AddLine(const SHAPE_LINE_CHAIN &aLine, int aType=0, int aWidth=0, const std::string aName="")
void AddCorner(const VECTOR2I &aA, const VECTOR2I &aB=VECTOR2I(0, 0))
Function AddCorner()
const SHAPE_LINE_CHAIN & CN() const
NODE * m_currentNode
Current world state
void MeanderSegment(const SEG &aSeg, int aBaseIndex=0)
Function MeanderSegment()
Definition: pns_meander.cpp:46
VECTOR2I m_currentStart
current routing start point (end of tail, beginning of head)
NODE * Branch()
Function Branch()
Definition: pns_node.cpp:106
void Append(int aX, int aY, bool aAllowDuplication=false)
Function Append()
void SetWidth(int aWidth)
Function SetWidth()
Definition: pns_meander.h:460
bool pairOrientation(const DIFF_PAIR::COUPLED_SEGMENTS &aPair)
const SEG baselineSegment(const DIFF_PAIR::COUPLED_SEGMENTS &aCoupledSegs)
SHAPE_LINE_CHAIN & Simplify()
Function Simplify()
std::vector< COUPLED_SEGMENTS > COUPLED_SEGMENTS_VEC
long long int origPathLength() const
std::vector< MEANDER_SHAPE * > & Meanders()
Function Meanders()
Definition: pns_meander.h:486
NODE * m_world
pointer to world to search colliding items
DEBUG_DECORATOR * Dbg() const
Definition: pns_algo_base.h:77
void tuneLineLength(MEANDERED_LINE &aTuned, long long int aElongation)
Function tuneLineLength()
virtual void AddSegment(SEG aS, int aColor, const std::string aName="")
Definition: seg.h:39
const SHAPE_LINE_CHAIN & CP() const
MEANDER_SETTINGS m_settings
meandering settings
int m_lengthTolerance
allowable tuning error
Definition: pns_meander.h:93
SHAPE_LINE_CHAIN.
int compareWithTolerance(long long int aValue, long long int aExpected, long long int aTolerance=0) const
Function compareWithTolerance()
long long int m_targetLength
desired length of the tuned line/diff pair (this is in nm, so allow more than board width)
Definition: pns_meander.h:87
const ENTRIES & CItems() const
Definition: pns_itemset.h:141
void Clear()
Function Clear() Removes all points from the line chain.
void SetBaselineOffset(int aOffset)
Function SetBaselineOffset()
Definition: pns_meander.h:476
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)
Function cutTunedLine()

References PNS::MEANDERED_LINE::AddCorner(), PNS::DEBUG_DECORATOR::AddLine(), PNS::DEBUG_DECORATOR::AddSegment(), SHAPE_LINE_CHAIN::Append(), baselineSegment(), PNS::NODE::Branch(), PNS::ITEM_SET::CItems(), SHAPE_LINE_CHAIN::Clear(), PNS::DIFF_PAIR::CN(), PNS::MEANDER_PLACER_BASE::compareWithTolerance(), PNS::DIFF_PAIR::CP(), PNS::MEANDER_PLACER_BASE::cutTunedLine(), PNS::ALGO_BASE::Dbg(), m_currentNode, m_currentStart, m_finalShapeN, m_finalShapeP, m_lastLength, m_lastStatus, PNS::MEANDER_SETTINGS::m_lengthTolerance, m_originPair, m_result, PNS::MEANDER_PLACER_BASE::m_settings, PNS::MEANDER_SETTINGS::m_targetLength, m_tunedPathN, m_tunedPathP, PNS::MEANDER_PLACER_BASE::m_world, PNS::MEANDERED_LINE::Meanders(), PNS::MEANDERED_LINE::MeanderSegment(), PNS::MT_EMPTY, origPathLength(), pairOrientation(), 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, and PNS::MEANDER_PLACER_BASE::tuneLineLength().

◆ origPathLength()

long long int PNS::DP_MEANDER_PLACER::origPathLength ( ) const
private

Definition at line 129 of file pns_dp_meander_placer.cpp.

130 {
131  long long int totalP = m_padToDieLenth;
132  long long int totalN = m_padToDieLenth;
133 
134  for( const ITEM* item : m_tunedPathP.CItems() )
135  {
136  if( const LINE* l = dyn_cast<const LINE*>( item ) )
137  totalP += l->CLine().Length();
138 
139  }
140 
141  for( const ITEM* item : m_tunedPathN.CItems() )
142  {
143  if( const LINE* l = dyn_cast<const LINE*>( item ) )
144  totalN += l->CLine().Length();
145  }
146 
147  return std::max( totalP, totalN );
148 }
int m_padToDieLenth
total length added by pad to die size
const ENTRIES & CItems() const
Definition: pns_itemset.h:141

References PNS::ITEM_SET::CItems(), PNS::MEANDER_PLACER_BASE::m_padToDieLenth, m_tunedPathN, and m_tunedPathP.

Referenced by Move().

◆ pairOrientation()

bool PNS::DP_MEANDER_PLACER::pairOrientation ( const DIFF_PAIR::COUPLED_SEGMENTS aPair)
private

Definition at line 160 of file pns_dp_meander_placer.cpp.

161 {
162  VECTOR2I midp = ( aPair.coupledP.A + aPair.coupledN.A ) / 2;
163 
164  //DrawDebugPoint(midp, 6);
165 
166  return aPair.coupledP.Side( midp ) > 0;
167 }

References SEG::A, PNS::DIFF_PAIR::COUPLED_SEGMENTS::coupledN, PNS::DIFF_PAIR::COUPLED_SEGMENTS::coupledP, and SEG::Side().

Referenced by Move().

◆ release()

void PNS::DP_MEANDER_PLACER::release ( )
private

Definition at line 124 of file pns_dp_meander_placer.cpp.

125 {
126 }

◆ Router()

◆ SetDebugDecorator()

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

Function SetDebugDecorator.

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

Definition at line 72 of file pns_algo_base.h.

73  {
74  m_debugDecorator = aDecorator;
75  }
DEBUG_DECORATOR * m_debugDecorator
Definition: pns_algo_base.h:83

References PNS::ALGO_BASE::m_debugDecorator.

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

◆ 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 62 of file pns_algo_base.h.

63  {
64  m_logger = aLogger;
65  }
LOGGER * m_logger
Definition: pns_algo_base.h:85

References PNS::ALGO_BASE::m_logger.

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

◆ 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::DP_MEANDER_PLACER::setWorld ( NODE aWorld)
private

◆ SpacingStep()

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

Function SpacingStep()

Increases/decreases the current meandering spcing by one step.

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

Definition at line 52 of file pns_meander_placer_base.cpp.

53 {
54  int s = m_settings.m_spacing + aSign * m_settings.m_step;
55  s = std::max( s, 2 * m_currentWidth );
56 
58 }
int m_currentWidth
width of the meandered trace(s)
int m_step
amplitude/spacing adjustment step
Definition: pns_meander.h:83
MEANDER_SETTINGS m_settings
meandering settings
int m_spacing
meandering period/spacing (see dialog picture for explanation)
Definition: pns_meander.h:81

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::DP_MEANDER_PLACER::Start ( const VECTOR2I aP,
ITEM aStartItem 
)
overridevirtual

Function Start()

Starts routing a single track at point aP, taking item aStartItem as anchor (unless NULL).

Implements PNS::PLACEMENT_ALGO.

Definition at line 72 of file pns_dp_meander_placer.cpp.

73 {
74  VECTOR2I p;
75 
76  if( !aStartItem || !aStartItem->OfKind( ITEM::SEGMENT_T ) )
77  {
78  Router()->SetFailureReason( _( "Please select a track whose length you want to tune." ) );
79  return false;
80  }
81 
82  m_initialSegment = static_cast<SEGMENT*>( aStartItem );
83 
84  p = m_initialSegment->Seg().NearestPoint( aP );
85 
87  m_currentStart = p;
88 
89  m_world = Router()->GetWorld()->Branch();
90 
91  TOPOLOGY topo( m_world );
92 
93  if( !topo.AssembleDiffPair( m_initialSegment, m_originPair ) )
94  {
95  Router()->SetFailureReason( _( "Unable to find complementary differential pair "
96  "net for length tuning. Make sure the names of the nets belonging "
97  "to a differential pair end with either _N/_P or +/-." ) );
98  return false;
99  }
100 
101  if( m_originPair.Gap() < 0 )
102  m_originPair.SetGap( Router()->Sizes().DiffPairGap() );
103 
104  if( !m_originPair.PLine().SegmentCount() ||
106  return false;
107 
108  m_tunedPathP = topo.AssembleTrivialPath( m_originPair.PLine().GetLink( 0 ) );
109  m_tunedPathN = topo.AssembleTrivialPath( m_originPair.NLine().GetLink( 0 ) );
110 
113  m_padToDieLenth = std::max( m_padToDieP, m_padToDieN );
114 
117 
119 
120  return true;
121 }
int GetTotalPadToDieLength(const LINE &aLine) const
ROUTER * Router() const
Returns the instance of our router
Definition: pns_algo_base.h:51
int Gap() const
int SegmentCount() const
Returns the number of segments in the line
Definition: pns_line.h:150
LINKED_ITEM * GetLink(int aIndex) const
Definition: pns_line.h:231
int Width() const
NODE * m_currentNode
Current world state
const SEG & Seg() const
Definition: pns_segment.h:83
VECTOR2I m_currentStart
current routing start point (end of tail, beginning of head)
NODE * Branch()
Function Branch()
Definition: pns_node.cpp:106
int m_currentWidth
width of the meandered trace(s)
void Remove(ARC *aArc)
Function Remove()
Definition: pns_node.cpp:796
void SetGap(int aGap)
#define NULL
NODE * m_world
pointer to world to search colliding items
void SetFailureReason(const wxString &aReason)
Definition: pns_router.h:225
const VECTOR2I NearestPoint(const VECTOR2I &aP) const
Function NearestPoint()
Definition: seg.h:397
int m_padToDieLenth
total length added by pad to die size
#define _(s)
Definition: 3d_actions.cpp:33
NODE * GetWorld() const
Definition: pns_router.h:152

References _, PNS::TOPOLOGY::AssembleDiffPair(), PNS::TOPOLOGY::AssembleTrivialPath(), PNS::NODE::Branch(), PNS::DIFF_PAIR::Gap(), PNS::LINE::GetLink(), PNS::MEANDER_PLACER_BASE::GetTotalPadToDieLength(), PNS::ROUTER::GetWorld(), m_currentNode, m_currentStart, PNS::MEANDER_PLACER_BASE::m_currentWidth, m_initialSegment, m_originPair, PNS::MEANDER_PLACER_BASE::m_padToDieLenth, m_padToDieN, m_padToDieP, m_tunedPathN, m_tunedPathP, PNS::MEANDER_PLACER_BASE::m_world, SEG::NearestPoint(), PNS::DIFF_PAIR::NLine(), NULL, PNS::ITEM::OfKind(), PNS::DIFF_PAIR::PLine(), PNS::NODE::Remove(), PNS::ALGO_BASE::Router(), PNS::SEGMENT::Seg(), PNS::ITEM::SEGMENT_T, PNS::LINE::SegmentCount(), PNS::ROUTER::SetFailureReason(), PNS::DIFF_PAIR::SetGap(), and PNS::DIFF_PAIR::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  }

◆ totalLength()

long long int PNS::DP_MEANDER_PLACER::totalLength ( )

◆ Trace()

const LINE PNS::DP_MEANDER_PLACER::Trace ( ) const

Definition at line 57 of file pns_dp_meander_placer.cpp.

58 {
59  return m_currentTraceP;
60 }

References m_currentTraceP.

◆ Traces()

const ITEM_SET PNS::DP_MEANDER_PLACER::Traces ( )
overridevirtual

Function Traces()

Returns all routed/tuned traces.

Implements PNS::PLACEMENT_ALGO.

Definition at line 366 of file pns_dp_meander_placer.cpp.

367 {
370 
371  ITEM_SET traces;
372 
373  traces.Add( &m_currentTraceP );
374  traces.Add( &m_currentTraceN );
375 
376  return traces;
377 }
std::unordered_set< SCH_ITEM * > ITEM_SET
Definition: sch_item.h:142

References PNS::ITEM_SET::Add(), m_currentTraceN, m_currentTraceP, m_finalShapeN, m_finalShapeP, m_originPair, PNS::DIFF_PAIR::NLine(), and PNS::DIFF_PAIR::PLine().

◆ tuneLineLength()

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

Function tuneLineLength()

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

Definition at line 112 of file pns_meander_placer_base.cpp.

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

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 Move().

◆ TuningInfo()

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

Function TuningInfo()

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

Implements PNS::MEANDER_PLACER_BASE.

Definition at line 392 of file pns_dp_meander_placer.cpp.

393 {
394  wxString status;
395 
396  switch( m_lastStatus )
397  {
398  case TOO_LONG:
399  status = _( "Too long: " );
400  break;
401  case TOO_SHORT:
402  status = _("Too short: " );
403  break;
404  case TUNED:
405  status = _( "Tuned: " );
406  break;
407  default:
408  return _( "?" );
409  }
410 
411  status += ::MessageTextFromValue( aUnits, m_lastLength, false );
412  status += "/";
413  status += ::MessageTextFromValue( aUnits, m_settings.m_targetLength, false );
414  status += " (gap: ";
415  status += ::MessageTextFromValue( aUnits, m_originPair.Gap(), false );
416  status += ")";
417 
418  return status;
419 }
int Gap() const
wxString MessageTextFromValue(EDA_UNITS aUnits, int aValue, bool aUseMils, EDA_DATA_TYPE aType)
Definition: base_units.cpp:124
MEANDER_SETTINGS m_settings
meandering settings
#define _(s)
Definition: 3d_actions.cpp:33
long long int m_targetLength
desired length of the tuned line/diff pair (this is in nm, so allow more than board width)
Definition: pns_meander.h:87

References _, PNS::DIFF_PAIR::Gap(), m_lastLength, m_lastStatus, m_originPair, PNS::MEANDER_PLACER_BASE::m_settings, PNS::MEANDER_SETTINGS::m_targetLength, MessageTextFromValue(), PNS::MEANDER_PLACER_BASE::TOO_LONG, PNS::MEANDER_PLACER_BASE::TOO_SHORT, and PNS::MEANDER_PLACER_BASE::TUNED.

◆ TuningStatus()

DP_MEANDER_PLACER::TUNING_STATUS PNS::DP_MEANDER_PLACER::TuningStatus ( ) const
overridevirtual

Function TuningStatus()

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

Implements PNS::MEANDER_PLACER_BASE.

Definition at line 422 of file pns_dp_meander_placer.cpp.

423 {
424  return m_lastStatus;
425 }

References 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 61 of file pns_meander_placer_base.cpp.

62 {
63  m_settings = aSettings;
64 }
MEANDER_SETTINGS m_settings
meandering settings

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  }

Friends And Related Function Documentation

◆ MEANDER_SHAPE

friend class MEANDER_SHAPE
friend

Definition at line 119 of file pns_dp_meander_placer.h.

Member Data Documentation

◆ m_coupledSegments

DIFF_PAIR::COUPLED_SEGMENTS_VEC PNS::DP_MEANDER_PLACER::m_coupledSegments
private

Definition at line 141 of file pns_dp_meander_placer.h.

◆ m_currentEnd

VECTOR2I PNS::MEANDER_PLACER_BASE::m_currentEnd
protectedinherited

◆ m_currentNode

NODE* PNS::DP_MEANDER_PLACER::m_currentNode
private

Current world state

Definition at line 138 of file pns_dp_meander_placer.h.

Referenced by CheckFit(), CommitPlacement(), CurrentNode(), DP_MEANDER_PLACER(), FixRoute(), Move(), and Start().

◆ m_currentStart

VECTOR2I PNS::DP_MEANDER_PLACER::m_currentStart
private

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

Definition at line 135 of file pns_dp_meander_placer.h.

Referenced by Move(), and Start().

◆ m_currentTraceN

LINE PNS::DP_MEANDER_PLACER::m_currentTraceN
private

Definition at line 143 of file pns_dp_meander_placer.h.

Referenced by Traces().

◆ m_currentTraceP

LINE PNS::DP_MEANDER_PLACER::m_currentTraceP
private

Definition at line 143 of file pns_dp_meander_placer.h.

Referenced by Trace(), and Traces().

◆ m_currentWidth

int PNS::MEANDER_PLACER_BASE::m_currentWidth
protectedinherited

◆ m_debugDecorator

DEBUG_DECORATOR* PNS::ALGO_BASE::m_debugDecorator
protectedinherited

Definition at line 83 of file pns_algo_base.h.

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

◆ m_finalShapeN

SHAPE_LINE_CHAIN PNS::DP_MEANDER_PLACER::m_finalShapeN
private

Definition at line 146 of file pns_dp_meander_placer.h.

Referenced by FixRoute(), Move(), and Traces().

◆ m_finalShapeP

SHAPE_LINE_CHAIN PNS::DP_MEANDER_PLACER::m_finalShapeP
private

Definition at line 146 of file pns_dp_meander_placer.h.

Referenced by FixRoute(), Move(), and Traces().

◆ m_initialSegment

SEGMENT* PNS::DP_MEANDER_PLACER::m_initialSegment
private

Definition at line 148 of file pns_dp_meander_placer.h.

Referenced by CurrentLayer(), DP_MEANDER_PLACER(), and Start().

◆ m_lastLength

long long int PNS::DP_MEANDER_PLACER::m_lastLength
private

Definition at line 150 of file pns_dp_meander_placer.h.

Referenced by DP_MEANDER_PLACER(), Move(), and TuningInfo().

◆ m_lastStatus

TUNING_STATUS PNS::DP_MEANDER_PLACER::m_lastStatus
private

Definition at line 153 of file pns_dp_meander_placer.h.

Referenced by DP_MEANDER_PLACER(), Move(), TuningInfo(), and TuningStatus().

◆ m_logger

LOGGER* PNS::ALGO_BASE::m_logger
protectedinherited

Definition at line 85 of file pns_algo_base.h.

Referenced by PNS::ALGO_BASE::SetLogger(), and PNS::WALKAROUND::singleStep().

◆ m_originPair

DIFF_PAIR PNS::DP_MEANDER_PLACER::m_originPair
private

◆ m_padToDieLenth

int PNS::MEANDER_PLACER_BASE::m_padToDieLenth
protectedinherited

◆ m_padToDieN

int PNS::DP_MEANDER_PLACER::m_padToDieN
private

Definition at line 152 of file pns_dp_meander_placer.h.

Referenced by DP_MEANDER_PLACER(), and Start().

◆ m_padToDieP

int PNS::DP_MEANDER_PLACER::m_padToDieP
private

Definition at line 151 of file pns_dp_meander_placer.h.

Referenced by DP_MEANDER_PLACER(), and Start().

◆ m_result

MEANDERED_LINE PNS::DP_MEANDER_PLACER::m_result
private

Definition at line 147 of file pns_dp_meander_placer.h.

Referenced by CheckFit(), and Move().

◆ m_router

ROUTER* PNS::ALGO_BASE::m_router
protectedinherited

Definition at line 84 of file pns_algo_base.h.

Referenced by PNS::ALGO_BASE::Router(), and PNS::ALGO_BASE::Settings().

◆ m_settings

◆ m_tunedPath

ITEM_SET PNS::DP_MEANDER_PLACER::m_tunedPath
private

Definition at line 144 of file pns_dp_meander_placer.h.

◆ m_tunedPathN

ITEM_SET PNS::DP_MEANDER_PLACER::m_tunedPathN
private

Definition at line 144 of file pns_dp_meander_placer.h.

Referenced by Move(), origPathLength(), and Start().

◆ m_tunedPathP

ITEM_SET PNS::DP_MEANDER_PLACER::m_tunedPathP
private

Definition at line 144 of file pns_dp_meander_placer.h.

Referenced by Move(), origPathLength(), and Start().

◆ m_world


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