KiCad PCB EDA Suite
PNS::WALKAROUND Class Reference

#include <pns_walkaround.h>

Inheritance diagram for PNS::WALKAROUND:
PNS::ALGO_BASE

Classes

struct  RESULT
 

Public Types

enum  WALKAROUND_STATUS { IN_PROGRESS = 0, ALMOST_DONE, DONE, STUCK }
 

Public Member Functions

 WALKAROUND (NODE *aWorld, ROUTER *aRouter)
 
 ~WALKAROUND ()
 
void SetWorld (NODE *aNode)
 
void SetIterationLimit (const int aIterLimit)
 
void SetSolidsOnly (bool aSolidsOnly)
 
void SetItemMask (int aMask)
 
void SetSingleDirection (bool aForceSingleDirection)
 
void SetSingleDirection2 (bool aForceSingleDirection)
 
void SetApproachCursor (bool aEnabled, const VECTOR2I &aPos)
 
void SetForceWinding (bool aEnabled, bool aCw)
 
void RestrictToSet (bool aEnabled, const std::set< ITEM * > &aSet)
 
WALKAROUND_STATUS Route (const LINE &aInitialPath, LINE &aWalkPath, bool aOptimize=true)
 
const RESULT Route (const LINE &aInitialPath)
 
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 Attributes

DEBUG_DECORATORm_debugDecorator
 
ROUTERm_router
 
LOGGERm_logger
 

Private Member Functions

void start (const LINE &aInitialPath)
 
WALKAROUND_STATUS singleStep (LINE &aPath, bool aWindingDirection)
 
NODE::OPT_OBSTACLE nearestObstacle (const LINE &aPath)
 

Private Attributes

NODEm_world
 
int m_recursiveBlockageCount
 
int m_iteration
 
int m_iterationLimit
 
int m_itemMask
 
bool m_forceSingleDirection
 
bool m_forceLongerPath
 
bool m_cursorApproachMode
 
bool m_forceWinding
 
bool m_forceCw
 
bool m_forceUniqueWindingDirection
 
VECTOR2I m_cursorPos
 
NODE::OPT_OBSTACLE m_currentObstacle [2]
 
bool m_recursiveCollision [2]
 
std::set< ITEM * > m_restrictedSet
 

Static Private Attributes

static const int DefaultIterationLimit = 50
 

Detailed Description

Definition at line 35 of file pns_walkaround.h.

Member Enumeration Documentation

◆ WALKAROUND_STATUS

Enumerator
IN_PROGRESS 
ALMOST_DONE 
DONE 
STUCK 

Definition at line 61 of file pns_walkaround.h.

Constructor & Destructor Documentation

◆ WALKAROUND()

PNS::WALKAROUND::WALKAROUND ( NODE aWorld,
ROUTER aRouter 
)
inline

Definition at line 40 of file pns_walkaround.h.

40  :
41  ALGO_BASE ( aRouter ),
42  m_world( aWorld ),
44  {
45  m_forceSingleDirection = false;
46  m_forceLongerPath = false;
47  m_forceWinding = false;
48  m_cursorApproachMode = false;
50 
51  // Initialize other members, to avoid uninitialized variables.
54  m_iteration = 0;
55  m_forceCw = false;
57  }
static const int DefaultIterationLimit
ALGO_BASE(ROUTER *aRouter)
Definition: pns_algo_base.h:45
bool m_recursiveCollision[2]
bool m_forceUniqueWindingDirection

References PNS::ITEM::ANY_T, m_cursorApproachMode, m_forceCw, m_forceLongerPath, m_forceSingleDirection, m_forceUniqueWindingDirection, m_forceWinding, m_itemMask, m_iteration, m_recursiveBlockageCount, and m_recursiveCollision.

◆ ~WALKAROUND()

PNS::WALKAROUND::~WALKAROUND ( )
inline

Definition at line 59 of file pns_walkaround.h.

59 {};

Member Function Documentation

◆ Dbg()

◆ Logger()

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

Reimplemented in PNS::SHOVE.

Definition at line 34 of file pns_algo_base.cpp.

35 {
36  return nullptr;
37 }

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

◆ nearestObstacle()

NODE::OPT_OBSTACLE PNS::WALKAROUND::nearestObstacle ( const LINE aPath)
private

Definition at line 41 of file pns_walkaround.cpp.

42 {
44  &aPath, m_itemMask, m_restrictedSet.empty() ? nullptr : &m_restrictedSet );
45 
46  if( m_restrictedSet.empty() )
47  return obs;
48 
49  else if( obs && m_restrictedSet.find ( obs->m_item ) != m_restrictedSet.end() )
50  return obs;
51 
52  return NODE::OPT_OBSTACLE();
53 }
std::set< ITEM * > m_restrictedSet
OPT_OBSTACLE NearestObstacle(const LINE *aLine, int aKindMask=ITEM::ANY_T, const std::set< ITEM * > *aRestrictedSet=nullptr)
Follow the line in search of an obstacle that is nearest to the starting to the line's starting point...
Definition: pns_node.cpp:296
OPT< OBSTACLE > OPT_OBSTACLE
Definition: pns_node.h:149

References m_itemMask, m_restrictedSet, m_world, and PNS::NODE::NearestObstacle().

Referenced by Route(), and singleStep().

◆ RestrictToSet()

void PNS::WALKAROUND::RestrictToSet ( bool  aEnabled,
const std::set< ITEM * > &  aSet 
)
inline

Definition at line 129 of file pns_walkaround.h.

130  {
131  if( aEnabled )
132  m_restrictedSet = aSet;
133  else
134  m_restrictedSet.clear();
135  }
std::set< ITEM * > m_restrictedSet

References m_restrictedSet.

Referenced by PNS::SHOVE::onCollidingSolid().

◆ Route() [1/2]

WALKAROUND::WALKAROUND_STATUS PNS::WALKAROUND::Route ( const LINE aInitialPath,
LINE aWalkPath,
bool  aOptimize = true 
)

Definition at line 209 of file pns_walkaround.cpp.

211 {
212  LINE path_cw( aInitialPath ), path_ccw( aInitialPath );
213  WALKAROUND_STATUS s_cw = IN_PROGRESS, s_ccw = IN_PROGRESS;
214  SHAPE_LINE_CHAIN best_path;
215 
216  // special case for via-in-the-middle-of-track placement
217  if( aInitialPath.PointCount() <= 1 )
218  {
219  if( aInitialPath.EndsWithVia() && m_world->CheckColliding( &aInitialPath.Via(),
220  m_itemMask ) )
221  return STUCK;
222 
223  aWalkPath = aInitialPath;
224  return DONE;
225  }
226 
227  start( aInitialPath );
228 
229  m_currentObstacle[0] = m_currentObstacle[1] = nearestObstacle( aInitialPath );
231 
232  aWalkPath = aInitialPath;
233 
234  if( m_forceWinding )
235  {
236  s_cw = m_forceCw ? IN_PROGRESS : STUCK;
237  s_ccw = m_forceCw ? STUCK : IN_PROGRESS;
238  m_forceSingleDirection = true;
239  }
240  else
241  {
242  m_forceSingleDirection = false;
243  }
244 
245  while( m_iteration < m_iterationLimit )
246  {
247  if( path_cw.PointCount() == 0 )
248  s_cw = STUCK; // cw path is empty, can't continue
249 
250  if( path_ccw.PointCount() == 0 )
251  s_ccw = STUCK; // ccw path is empty, can't continue
252 
253  if( s_cw != STUCK )
254  s_cw = singleStep( path_cw, true );
255 
256  if( s_ccw != STUCK )
257  s_ccw = singleStep( path_ccw, false );
258 
259  if( ( s_cw == DONE && s_ccw == DONE ) || ( s_cw == STUCK && s_ccw == STUCK ) )
260  {
261  int len_cw = path_cw.CLine().Length();
262  int len_ccw = path_ccw.CLine().Length();
263 
264  if( m_forceLongerPath )
265  aWalkPath = ( len_cw > len_ccw ? path_cw : path_ccw );
266  else
267  aWalkPath = ( len_cw < len_ccw ? path_cw : path_ccw );
268 
269  break;
270  }
271  else if( s_cw == DONE && !m_forceLongerPath )
272  {
273  aWalkPath = path_cw;
274  break;
275  }
276  else if( s_ccw == DONE && !m_forceLongerPath )
277  {
278  aWalkPath = path_ccw;
279  break;
280  }
281 
282  m_iteration++;
283  }
284 
286  {
287  int len_cw = path_cw.CLine().Length();
288  int len_ccw = path_ccw.CLine().Length();
289 
290  if( m_forceLongerPath )
291  aWalkPath = ( len_cw > len_ccw ? path_cw : path_ccw );
292  else
293  aWalkPath = ( len_cw < len_ccw ? path_cw : path_ccw );
294  }
295 
296  aWalkPath.Line().Simplify();
297 
298  if( aWalkPath.SegmentCount() < 1 )
299  return STUCK;
300 
301  if( aWalkPath.CPoint( -1 ) != aInitialPath.CPoint( -1 ) )
302  return ALMOST_DONE;
303 
304  if( aWalkPath.CPoint( 0 ) != aInitialPath.CPoint( 0 ) )
305  return STUCK;
306 
307  WALKAROUND_STATUS st = s_ccw == DONE || s_cw == DONE ? DONE : STUCK;
308 
309  if( st == DONE )
310  {
311  if( aOptimize )
313  }
314 
315  return st;
316 }
WALKAROUND_STATUS singleStep(LINE &aPath, bool aWindingDirection)
static bool Optimize(LINE *aLine, int aEffortLevel, NODE *aWorld, const VECTOR2I &aV=VECTOR2I(0, 0))
NODE::OPT_OBSTACLE m_currentObstacle[2]
void start(const LINE &aInitialPath)
NODE::OPT_OBSTACLE nearestObstacle(const LINE &aPath)
Reduce corner cost by merging obtuse segments.
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
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:450

References ALMOST_DONE, PNS::NODE::CheckColliding(), PNS::LINE::CLine(), PNS::LINE::CPoint(), DONE, PNS::LINE::EndsWithVia(), IN_PROGRESS, SHAPE_LINE_CHAIN::Length(), PNS::LINE::Line(), m_currentObstacle, m_forceCw, m_forceLongerPath, m_forceSingleDirection, m_forceWinding, m_itemMask, m_iteration, m_iterationLimit, m_recursiveBlockageCount, m_world, PNS::OPTIMIZER::MERGE_OBTUSE, nearestObstacle(), PNS::OPTIMIZER::Optimize(), PNS::LINE::PointCount(), PNS::LINE::SegmentCount(), SHAPE_LINE_CHAIN::Simplify(), singleStep(), start(), STUCK, and PNS::LINE::Via().

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

◆ Route() [2/2]

const WALKAROUND::RESULT PNS::WALKAROUND::Route ( const LINE aInitialPath)

Definition at line 98 of file pns_walkaround.cpp.

99 {
100  LINE path_cw( aInitialPath ), path_ccw( aInitialPath );
101  WALKAROUND_STATUS s_cw = IN_PROGRESS, s_ccw = IN_PROGRESS;
102  SHAPE_LINE_CHAIN best_path;
103  RESULT result;
104 
105  // special case for via-in-the-middle-of-track placement
106  if( aInitialPath.PointCount() <= 1 )
107  {
108  if( aInitialPath.EndsWithVia() && m_world->CheckColliding( &aInitialPath.Via(),
109  m_itemMask ) )
110  return RESULT( STUCK, STUCK );
111 
112  return RESULT( DONE, DONE, aInitialPath, aInitialPath );
113  }
114 
115  start( aInitialPath );
116 
117  m_currentObstacle[0] = m_currentObstacle[1] = nearestObstacle( aInitialPath );
119 
120  result.lineCw = aInitialPath;
121  result.lineCcw = aInitialPath;
122 
123  if( m_forceWinding )
124  {
125  s_cw = m_forceCw ? IN_PROGRESS : STUCK;
126  s_ccw = m_forceCw ? STUCK : IN_PROGRESS;
127  m_forceSingleDirection = true;
128  }
129  else
130  {
131  m_forceSingleDirection = false;
132  }
133 
134  // In some situations, there isn't a trivial path (or even a path at all). Hitting the
135  // iteration limit causes lag, so we can exit out early if the walkaround path gets very long
136  // compared with the initial path. If the length exceeds the initial length times this factor,
137  // fail out.
138  const int maxWalkDistFactor = 10;
139  long long lengthLimit = aInitialPath.CLine().Length() * maxWalkDistFactor;
140 
141  while( m_iteration < m_iterationLimit )
142  {
143  if( s_cw != STUCK && s_cw != ALMOST_DONE )
144  s_cw = singleStep( path_cw, true );
145 
146  if( s_ccw != STUCK && s_ccw != ALMOST_DONE )
147  s_ccw = singleStep( path_ccw, false );
148 
149  if( s_cw != IN_PROGRESS )
150  {
151  result.lineCw = path_cw;
152  result.statusCw = s_cw;
153  }
154 
155  if( s_ccw != IN_PROGRESS )
156  {
157  result.lineCcw = path_ccw;
158  result.statusCcw = s_ccw;
159  }
160 
161  if( s_cw != IN_PROGRESS && s_ccw != IN_PROGRESS )
162  break;
163 
164  // Safety valve
165  if( path_cw.Line().Length() > lengthLimit && path_ccw.Line().Length() > lengthLimit )
166  break;
167 
168  m_iteration++;
169  }
170 
171  if( s_cw == IN_PROGRESS )
172  {
173  result.lineCw = path_cw;
174  result.statusCw = ALMOST_DONE;
175  }
176 
177  if( s_ccw == IN_PROGRESS )
178  {
179  result.lineCcw = path_ccw;
180  result.statusCcw = ALMOST_DONE;
181  }
182 
183  if( result.lineCw.SegmentCount() < 1 || result.lineCw.CPoint( 0 ) != aInitialPath.CPoint( 0 ) )
184  {
185  result.statusCw = STUCK;
186  }
187 
188  if( result.lineCw.PointCount() > 0 && result.lineCw.CPoint( -1 ) != aInitialPath.CPoint( -1 ) )
189  {
190  result.statusCw = ALMOST_DONE;
191  }
192 
193  if( result.lineCcw.SegmentCount() < 1 ||
194  result.lineCcw.CPoint( 0 ) != aInitialPath.CPoint( 0 ) )
195  {
196  result.statusCcw = STUCK;
197  }
198 
199  if( result.lineCcw.PointCount() > 0 &&
200  result.lineCcw.CPoint( -1 ) != aInitialPath.CPoint( -1 ) )
201  {
202  result.statusCcw = ALMOST_DONE;
203  }
204 
205  return result;
206 }
WALKAROUND_STATUS singleStep(LINE &aPath, bool aWindingDirection)
NODE::OPT_OBSTACLE m_currentObstacle[2]
void start(const LINE &aInitialPath)
NODE::OPT_OBSTACLE nearestObstacle(const LINE &aPath)
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
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:450

References ALMOST_DONE, PNS::NODE::CheckColliding(), PNS::LINE::CLine(), PNS::LINE::CPoint(), DONE, PNS::LINE::EndsWithVia(), IN_PROGRESS, SHAPE_LINE_CHAIN::Length(), PNS::LINE::Line(), PNS::WALKAROUND::RESULT::lineCcw, PNS::WALKAROUND::RESULT::lineCw, m_currentObstacle, m_forceCw, m_forceSingleDirection, m_forceWinding, m_itemMask, m_iteration, m_iterationLimit, m_recursiveBlockageCount, m_world, nearestObstacle(), PNS::LINE::PointCount(), PNS::LINE::SegmentCount(), singleStep(), start(), PNS::WALKAROUND::RESULT::statusCcw, PNS::WALKAROUND::RESULT::statusCw, STUCK, and PNS::LINE::Via().

◆ Router()

◆ SetApproachCursor()

void PNS::WALKAROUND::SetApproachCursor ( bool  aEnabled,
const VECTOR2I aPos 
)
inline

Definition at line 117 of file pns_walkaround.h.

118  {
119  m_cursorPos = aPos;
120  m_cursorApproachMode = aEnabled;
121  }
VECTOR2I m_cursorPos

References m_cursorApproachMode, and m_cursorPos.

Referenced by PNS::LINE_PLACER::rhShoveOnly().

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

◆ SetForceWinding()

void PNS::WALKAROUND::SetForceWinding ( bool  aEnabled,
bool  aCw 
)
inline

Definition at line 123 of file pns_walkaround.h.

124  {
125  m_forceCw = aCw;
126  m_forceWinding = aEnabled;
127  }

References m_forceCw, and m_forceWinding.

◆ SetItemMask()

void PNS::WALKAROUND::SetItemMask ( int  aMask)
inline

Definition at line 101 of file pns_walkaround.h.

102  {
103  m_itemMask = aMask;
104  }

References m_itemMask.

◆ SetIterationLimit()

void PNS::WALKAROUND::SetIterationLimit ( const int  aIterLimit)
inline

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

◆ SetSingleDirection()

void PNS::WALKAROUND::SetSingleDirection ( bool  aForceSingleDirection)
inline

Definition at line 106 of file pns_walkaround.h.

107  {
108  m_forceSingleDirection = aForceSingleDirection;
109  m_forceLongerPath = aForceSingleDirection;
110  }

References m_forceLongerPath, and m_forceSingleDirection.

Referenced by PNS::SHOVE::onCollidingSolid().

◆ SetSingleDirection2()

void PNS::WALKAROUND::SetSingleDirection2 ( bool  aForceSingleDirection)
inline

Definition at line 112 of file pns_walkaround.h.

113  {
114  m_forceSingleDirection = aForceSingleDirection;
115  }

References m_forceSingleDirection.

◆ SetSolidsOnly()

void PNS::WALKAROUND::SetSolidsOnly ( bool  aSolidsOnly)
inline

◆ Settings()

◆ SetWorld()

void PNS::WALKAROUND::SetWorld ( NODE aNode)
inline

Definition at line 83 of file pns_walkaround.h.

84  {
85  m_world = aNode;
86  }

References m_world.

Referenced by PNS::LINE_PLACER::rhShoveOnly().

◆ singleStep()

WALKAROUND::WALKAROUND_STATUS PNS::WALKAROUND::singleStep ( LINE aPath,
bool  aWindingDirection 
)
private

Definition at line 56 of file pns_walkaround.cpp.

57 {
58  OPT<OBSTACLE>& current_obs =
59  aWindingDirection ? m_currentObstacle[0] : m_currentObstacle[1];
60 
61  if( !current_obs )
62  return DONE;
63 
64  VECTOR2I initialLast = aPath.CPoint( -1 );
65 
66  SHAPE_LINE_CHAIN path_walk;
67 
68  bool s_cw = aPath.Walkaround( current_obs->m_hull, path_walk, aWindingDirection );
69 
70  PNS_DBG( Dbg(), BeginGroup, "hull/walk" );
71  char name[128];
72  snprintf( name, sizeof( name ), "hull-%s-%d", aWindingDirection ? "cw" : "ccw", m_iteration );
73  PNS_DBG( Dbg(), AddLine, current_obs->m_hull, RED, 1, name );
74  snprintf( name, sizeof( name ), "path-%s-%d", aWindingDirection ? "cw" : "ccw", m_iteration );
75  PNS_DBG( Dbg(), AddLine, aPath.CLine(), GREEN, 1, name );
76  snprintf( name, sizeof( name ), "result-%s-%d", aWindingDirection ? "cw" : "ccw", m_iteration );
77  PNS_DBG( Dbg(), AddLine, path_walk, BLUE, 10000, name );
78  PNS_DBG( Dbg(), Message, wxString::Format( "Stat cw %d", !!s_cw ) );
79  PNS_DBGN( Dbg(), EndGroup );
80 
81  path_walk.Simplify();
82  aPath.SetShape( path_walk );
83 
84  // If the end of the line is inside an obstacle, additional walkaround iterations are not
85  // going to help. Exit now to prevent pegging the iteration limiter and causing lag.
86  if( current_obs && current_obs->m_hull.PointInside( initialLast ) &&
87  !current_obs->m_hull.PointOnEdge( initialLast ) )
88  {
89  return ALMOST_DONE;
90  }
91 
92  current_obs = nearestObstacle( LINE( aPath, path_walk ) );
93 
94  return IN_PROGRESS;
95 }
#define PNS_DBGN(dbg, method)
SHAPE_LINE_CHAIN & Simplify(bool aRemoveColinear=true)
Simplify the line chain by removing colinear adjacent segments and duplicate vertices.
NODE::OPT_OBSTACLE m_currentObstacle[2]
Definition: color4d.h:57
#define PNS_DBG(dbg, method,...)
DEBUG_DECORATOR * Dbg() const
Definition: pns_algo_base.h:78
Definition: color4d.h:59
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200
Definition: color4d.h:56
NODE::OPT_OBSTACLE nearestObstacle(const LINE &aPath)
const char * name
Definition: DXF_plotter.cpp:56
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
boost::optional< T > OPT
Definition: optional.h:7

References ALMOST_DONE, BLUE, PNS::LINE::CLine(), PNS::LINE::CPoint(), PNS::ALGO_BASE::Dbg(), DONE, Format(), GREEN, IN_PROGRESS, m_currentObstacle, m_iteration, name, nearestObstacle(), PNS_DBG, PNS_DBGN, RED, PNS::LINE::SetShape(), SHAPE_LINE_CHAIN::Simplify(), and PNS::LINE::Walkaround().

Referenced by Route().

◆ start()

void PNS::WALKAROUND::start ( const LINE aInitialPath)
private

Definition at line 34 of file pns_walkaround.cpp.

35 {
36  m_iteration = 0;
37  m_iterationLimit = 50;
38 }

References m_iteration, and m_iterationLimit.

Referenced by Route().

◆ VisibleViewArea()

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

Definition at line 40 of file pns_algo_base.cpp.

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

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

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

Member Data Documentation

◆ DefaultIterationLimit

const int PNS::WALKAROUND::DefaultIterationLimit = 50
staticprivate

Definition at line 37 of file pns_walkaround.h.

◆ m_currentObstacle

NODE::OPT_OBSTACLE PNS::WALKAROUND::m_currentObstacle[2]
private

Definition at line 160 of file pns_walkaround.h.

Referenced by Route(), and singleStep().

◆ m_cursorApproachMode

bool PNS::WALKAROUND::m_cursorApproachMode
private

Definition at line 155 of file pns_walkaround.h.

Referenced by SetApproachCursor(), and WALKAROUND().

◆ m_cursorPos

VECTOR2I PNS::WALKAROUND::m_cursorPos
private

Definition at line 159 of file pns_walkaround.h.

Referenced by SetApproachCursor().

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

bool PNS::WALKAROUND::m_forceCw
private

Definition at line 157 of file pns_walkaround.h.

Referenced by Route(), SetForceWinding(), and WALKAROUND().

◆ m_forceLongerPath

bool PNS::WALKAROUND::m_forceLongerPath
private

Definition at line 154 of file pns_walkaround.h.

Referenced by Route(), SetSingleDirection(), and WALKAROUND().

◆ m_forceSingleDirection

bool PNS::WALKAROUND::m_forceSingleDirection
private

Definition at line 154 of file pns_walkaround.h.

Referenced by Route(), SetSingleDirection(), SetSingleDirection2(), and WALKAROUND().

◆ m_forceUniqueWindingDirection

bool PNS::WALKAROUND::m_forceUniqueWindingDirection
private

Definition at line 158 of file pns_walkaround.h.

Referenced by WALKAROUND().

◆ m_forceWinding

bool PNS::WALKAROUND::m_forceWinding
private

Definition at line 156 of file pns_walkaround.h.

Referenced by Route(), SetForceWinding(), and WALKAROUND().

◆ m_itemMask

int PNS::WALKAROUND::m_itemMask
private

Definition at line 153 of file pns_walkaround.h.

Referenced by nearestObstacle(), Route(), SetItemMask(), SetSolidsOnly(), and WALKAROUND().

◆ m_iteration

int PNS::WALKAROUND::m_iteration
private

Definition at line 151 of file pns_walkaround.h.

Referenced by Route(), singleStep(), start(), and WALKAROUND().

◆ m_iterationLimit

int PNS::WALKAROUND::m_iterationLimit
private

Definition at line 152 of file pns_walkaround.h.

Referenced by Route(), SetIterationLimit(), and start().

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

int PNS::WALKAROUND::m_recursiveBlockageCount
private

Definition at line 150 of file pns_walkaround.h.

Referenced by Route(), and WALKAROUND().

◆ m_recursiveCollision

bool PNS::WALKAROUND::m_recursiveCollision[2]
private

Definition at line 161 of file pns_walkaround.h.

Referenced by WALKAROUND().

◆ m_restrictedSet

std::set<ITEM*> PNS::WALKAROUND::m_restrictedSet
private

Definition at line 162 of file pns_walkaround.h.

Referenced by nearestObstacle(), and RestrictToSet().

◆ m_router

◆ m_world

NODE* PNS::WALKAROUND::m_world
private

Definition at line 148 of file pns_walkaround.h.

Referenced by nearestObstacle(), Route(), and SetWorld().


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