KiCad PCB EDA Suite
PNS::DRAGGER Class Reference

DRAGGER. More...

#include <pns_dragger.h>

Inheritance diagram for PNS::DRAGGER:
PNS::DRAG_ALGO PNS::ALGO_BASE

Public Member Functions

 DRAGGER (ROUTER *aRouter)
 
 ~DRAGGER ()
 
virtual bool Start (const VECTOR2I &aP, ITEM_SET &aPrimitives) override
 Function Start() More...
 
bool Drag (const VECTOR2I &aP) override
 Function Drag() More...
 
bool FixRoute () override
 Function FixRoute() More...
 
NODECurrentNode () const override
 Function CurrentNode() More...
 
const std::vector< int > CurrentNets () const override
 Function CurrentNets() More...
 
int CurrentLayer () const override
 Function CurrentLayer() More...
 
const ITEM_SET Traces () override
 Function Traces() More...
 
void SetMode (int aDragMode) override
 
virtual void SetWorld (NODE *aWorld)
 Function SetWorld() 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 Attributes

NODEm_world
 
DEBUG_DECORATORm_debugDecorator
 
ROUTERm_router
 
LOGGERm_logger
 

Private Member Functions

const ITEM_SET findViaFanoutByHandle (NODE *aNode, const VIA_HANDLE &handle)
 
bool dragMarkObstacles (const VECTOR2I &aP)
 
bool dragShove (const VECTOR2I &aP)
 
bool dragWalkaround (const VECTOR2I &aP)
 
bool startDragSegment (const VECTOR2D &aP, SEGMENT *aSeg)
 
bool startDragArc (const VECTOR2D &aP, ARC *aArc)
 
bool startDragVia (VIA *aVia)
 
bool dragViaMarkObstacles (const VIA_HANDLE &aHandle, NODE *aNode, const VECTOR2I &aP)
 
bool dragViaWalkaround (const VIA_HANDLE &aHandle, NODE *aNode, const VECTOR2I &aP)
 
void optimizeAndUpdateDraggedLine (LINE &aDragged, const LINE &aOrig, const VECTOR2I &aP)
 
bool propagateViaForces (NODE *node, std::set< VIA * > &vias)
 
bool tryWalkaround (NODE *aNode, LINE &aOrig, LINE &aWalk)
 

Private Attributes

VIA_HANDLE m_initialVia
 
VIA_HANDLE m_draggedVia
 
NODEm_lastNode
 
int m_mode
 
LINE m_draggedLine
 
std::unique_ptr< SHOVEm_shove
 
int m_draggedSegmentIndex
 
bool m_dragStatus
 
PNS_MODE m_currentMode
 
ITEM_SET m_origViaConnections
 
VECTOR2D m_lastValidPoint
 Contains the list of items that are currently modified by the dragger. More...
 
ITEM_SET m_draggedItems
 If true, moves the connection lines without maintaining 45 degrees corners. More...
 
bool m_freeAngleMode
 
MOUSE_TRAIL_TRACER m_mouseTrailTracer
 

Detailed Description

DRAGGER.

Via, segment and corner dragging algorithm.

Definition at line 47 of file pns_dragger.h.

Constructor & Destructor Documentation

◆ DRAGGER()

PNS::DRAGGER::DRAGGER ( ROUTER aRouter)

Definition at line 32 of file pns_dragger.cpp.

32  :
33  DRAG_ALGO( aRouter )
34 {
35  m_world = NULL;
36  m_lastNode = NULL;
39  m_dragStatus = false;
41  m_freeAngleMode = false;
42 }
bool m_dragStatus
Definition: pns_dragger.h:139
DRAG_ALGO(ROUTER *aRouter)
Definition: pns_drag_algo.h:45
#define NULL
int m_draggedSegmentIndex
Definition: pns_dragger.h:138
NODE * m_lastNode
Definition: pns_dragger.h:134
Ignore collisions, mark obstacles.
PNS_MODE m_currentMode
Definition: pns_dragger.h:140
bool m_freeAngleMode
Definition: pns_dragger.h:148

References PNS::DM_SEGMENT, m_currentMode, m_draggedSegmentIndex, m_dragStatus, m_freeAngleMode, m_lastNode, m_mode, PNS::DRAG_ALGO::m_world, NULL, and PNS::RM_MarkObstacles.

◆ ~DRAGGER()

PNS::DRAGGER::~DRAGGER ( )

Definition at line 45 of file pns_dragger.cpp.

46 {
47 }

Member Function Documentation

◆ CurrentLayer()

int PNS::DRAGGER::CurrentLayer ( ) const
inlineoverridevirtual

Function CurrentLayer()

Returns the layer of currently routed track.

Implements PNS::DRAG_ALGO.

Definition at line 101 of file pns_dragger.h.

102  {
103  return m_draggedLine.Layer();
104  }
virtual int Layer() const
Definition: pns_item.h:154
LINE m_draggedLine
Definition: pns_dragger.h:136

References PNS::ITEM::Layer(), and m_draggedLine.

◆ CurrentNets()

const std::vector<int> PNS::DRAGGER::CurrentNets ( ) const
inlineoverridevirtual

Function CurrentNets()

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

Implements PNS::DRAG_ALGO.

Definition at line 91 of file pns_dragger.h.

92  {
93  return std::vector<int>( 1, m_draggedLine.Net() );
94  }
LINE m_draggedLine
Definition: pns_dragger.h:136
int Net() const
Definition: pns_item.h:148

References m_draggedLine, and PNS::ITEM::Net().

◆ CurrentNode()

NODE * PNS::DRAGGER::CurrentNode ( ) const
overridevirtual

Function CurrentNode()

Returns the most recent world state, including all items changed due to dragging operation.

Implements PNS::DRAG_ALGO.

Definition at line 662 of file pns_dragger.cpp.

663 {
664  return m_lastNode ? m_lastNode : m_world;
665 }
NODE * m_lastNode
Definition: pns_dragger.h:134

References m_lastNode, and PNS::DRAG_ALGO::m_world.

Referenced by FixRoute().

◆ Dbg()

◆ Drag()

bool PNS::DRAGGER::Drag ( const VECTOR2I aP)
overridevirtual

Function Drag()

Drags the current segment/corner/via to the point aP.

Returns
true, if dragging finished with success.

Implements PNS::DRAG_ALGO.

Definition at line 623 of file pns_dragger.cpp.

624 {
626 
627  bool ret = false;
628 
629  if( m_freeAngleMode )
630  {
631  ret = dragMarkObstacles( aP );
632  }
633  else
634  {
635  switch( m_currentMode )
636  {
637  case RM_MarkObstacles:
638  ret = dragMarkObstacles( aP );
639  break;
640 
641  case RM_Shove:
642  case RM_Smart:
643  ret = dragShove( aP );
644  break;
645 
646  case RM_Walkaround:
647  ret = dragWalkaround( aP );
648  break;
649 
650  default:
651  break;
652  }
653  }
654 
655  if( ret )
656  m_lastValidPoint = aP;
657 
658  return ret;
659 }
void AddTrailPoint(const VECTOR2I &aP)
MOUSE_TRAIL_TRACER m_mouseTrailTracer
Definition: pns_dragger.h:149
Guess what's better, try to make least mess on the PCB.
bool dragWalkaround(const VECTOR2I &aP)
Ignore collisions, mark obstacles.
bool dragShove(const VECTOR2I &aP)
PNS_MODE m_currentMode
Definition: pns_dragger.h:140
bool dragMarkObstacles(const VECTOR2I &aP)
Only walk around.
bool m_freeAngleMode
Definition: pns_dragger.h:148
VECTOR2D m_lastValidPoint
Contains the list of items that are currently modified by the dragger.
Definition: pns_dragger.h:142

References PNS::MOUSE_TRAIL_TRACER::AddTrailPoint(), dragMarkObstacles(), dragShove(), dragWalkaround(), m_currentMode, m_freeAngleMode, m_lastValidPoint, m_mouseTrailTracer, PNS::RM_MarkObstacles, PNS::RM_Shove, PNS::RM_Smart, and PNS::RM_Walkaround.

Referenced by FixRoute().

◆ dragMarkObstacles()

bool PNS::DRAGGER::dragMarkObstacles ( const VECTOR2I aP)
private

Definition at line 211 of file pns_dragger.cpp.

212 {
213  // fixme: rewrite using shared_ptr...
214  if( m_lastNode )
215  {
216  delete m_lastNode;
217  m_lastNode = nullptr;
218  }
219 
221 
222  switch( m_mode )
223  {
224  case DM_SEGMENT:
225  case DM_CORNER:
226  {
227  //TODO: Make threshhold configurable
228  int thresh = Settings().SmoothDraggedSegments() ? m_draggedLine.Width() / 4 : 0;
229  LINE origLine( m_draggedLine );
230  LINE dragged( m_draggedLine );
231  dragged.SetSnapThreshhold( thresh );
232  dragged.ClearLinks();
233 
234  if( m_mode == DM_SEGMENT )
235  dragged.DragSegment( aP, m_draggedSegmentIndex );
236  else
237  dragged.DragCorner( aP, m_draggedSegmentIndex, m_freeAngleMode );
238 
239  m_lastNode->Remove( origLine );
240  m_lastNode->Add( dragged );
241 
243  m_draggedItems.Add( dragged );
244 
245  break;
246  }
247 
248  case DM_VIA: // fixme...
249  {
251 
252  break;
253  }
254  }
255 
256  if( Settings().CanViolateDRC() )
257  m_dragStatus = true;
258  else
260 
261  return true;
262 }
ITEM_SET m_draggedItems
If true, moves the connection lines without maintaining 45 degrees corners.
Definition: pns_dragger.h:145
bool m_dragStatus
Definition: pns_dragger.h:139
LINE m_draggedLine
Definition: pns_dragger.h:136
void Add(const LINE &aLine)
Definition: pns_itemset.cpp:32
NODE * Branch()
Create a lightweight copy (called branch) of self that tracks the changes (added/removed items) wrs t...
Definition: pns_node.cpp:124
void Remove(ARC *aArc)
Remove an item from this branch.
Definition: pns_node.cpp:804
ROUTING_SETTINGS & Settings() const
Return the logger object, allowing to dump geometry to a file.
bool dragViaMarkObstacles(const VIA_HANDLE &aHandle, NODE *aNode, const VECTOR2I &aP)
int m_draggedSegmentIndex
Definition: pns_dragger.h:138
bool SmoothDraggedSegments() const
Enable/disable smoothing segments during dragging.
NODE * m_lastNode
Definition: pns_dragger.h:134
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:427
VIA_HANDLE m_initialVia
Definition: pns_dragger.h:131
int Width() const
Return true if the line is geometrically identical as line aOther.
Definition: pns_line.h:156
bool m_freeAngleMode
Definition: pns_dragger.h:148
bool Add(std::unique_ptr< SEGMENT > aSegment, bool aAllowRedundant=false)
Add an item to the current node.
Definition: pns_node.cpp:615

References PNS::ITEM_SET::Add(), PNS::NODE::Add(), PNS::NODE::Branch(), PNS::NODE::CheckColliding(), PNS::ITEM_SET::Clear(), PNS::LINK_HOLDER::ClearLinks(), PNS::DM_CORNER, PNS::DM_SEGMENT, PNS::DM_VIA, PNS::LINE::DragCorner(), PNS::LINE::DragSegment(), dragViaMarkObstacles(), m_draggedItems, m_draggedLine, m_draggedSegmentIndex, m_dragStatus, m_freeAngleMode, m_initialVia, m_lastNode, m_mode, PNS::DRAG_ALGO::m_world, PNS::NODE::Remove(), PNS::LINE::SetSnapThreshhold(), PNS::ALGO_BASE::Settings(), PNS::ROUTING_SETTINGS::SmoothDraggedSegments(), and PNS::LINE::Width().

Referenced by Drag().

◆ dragShove()

bool PNS::DRAGGER::dragShove ( const VECTOR2I aP)
private

Definition at line 520 of file pns_dragger.cpp.

521 {
522  bool ok = false;
523 
524  if( m_lastNode )
525  {
526  delete m_lastNode;
527  m_lastNode = NULL;
528  }
529 
530  switch( m_mode )
531  {
532  case DM_SEGMENT:
533  case DM_CORNER:
534  {
535  //TODO: Make threshhold configurable
536  int thresh = Settings().SmoothDraggedSegments() ? m_draggedLine.Width() / 2 : 0;
537  LINE dragged( m_draggedLine );
538  dragged.SetSnapThreshhold( thresh );
539 
540  if( m_mode == DM_SEGMENT )
541  dragged.DragSegment( aP, m_draggedSegmentIndex );
542  else
543  dragged.DragCorner( aP, m_draggedSegmentIndex );
544 
545  SHOVE::SHOVE_STATUS st = m_shove->ShoveLines( dragged );
546 
547  if( st == SHOVE::SH_OK )
548  ok = true;
549  else if( st == SHOVE::SH_HEAD_MODIFIED )
550  {
551  dragged = m_shove->NewHead();
552  ok = true;
553  }
554 
555  m_lastNode = m_shove->CurrentNode()->Branch();
556 
557  if( ok )
558  {
559  VECTOR2D lockV;
560  dragged.ClearLinks();
561  dragged.Unmark();
562 
564  }
565 
566  break;
567  }
568 
569  case DM_VIA:
570  {
571  VIA_HANDLE newVia;
572 
573  SHOVE::SHOVE_STATUS st = m_shove->ShoveDraggingVia( m_draggedVia, aP, newVia );
574 
575  if( st == SHOVE::SH_OK || st == SHOVE::SH_HEAD_MODIFIED )
576  ok = true;
577 
578  m_lastNode = m_shove->CurrentNode()->Branch();
579 
580  if( newVia.valid )
581  m_draggedVia = newVia;
582 
584  break;
585  }
586  }
587 
588  m_dragStatus = ok;
589 
590  return ok;
591 }
ITEM_SET m_draggedItems
If true, moves the connection lines without maintaining 45 degrees corners.
Definition: pns_dragger.h:145
std::unique_ptr< SHOVE > m_shove
Definition: pns_dragger.h:137
bool m_dragStatus
Definition: pns_dragger.h:139
void optimizeAndUpdateDraggedLine(LINE &aDragged, const LINE &aOrig, const VECTOR2I &aP)
VIA_HANDLE m_draggedVia
Definition: pns_dragger.h:132
LINE m_draggedLine
Definition: pns_dragger.h:136
ROUTING_SETTINGS & Settings() const
Return the logger object, allowing to dump geometry to a file.
#define NULL
int m_draggedSegmentIndex
Definition: pns_dragger.h:138
bool SmoothDraggedSegments() const
Enable/disable smoothing segments during dragging.
NODE * m_lastNode
Definition: pns_dragger.h:134
int Width() const
Return true if the line is geometrically identical as line aOther.
Definition: pns_line.h:156

References PNS::ITEM_SET::Clear(), PNS::LINK_HOLDER::ClearLinks(), PNS::DM_CORNER, PNS::DM_SEGMENT, PNS::DM_VIA, PNS::LINE::DragCorner(), PNS::LINE::DragSegment(), m_draggedItems, m_draggedLine, m_draggedSegmentIndex, m_draggedVia, m_dragStatus, m_lastNode, m_mode, m_shove, NULL, optimizeAndUpdateDraggedLine(), PNS::LINE::SetSnapThreshhold(), PNS::ALGO_BASE::Settings(), PNS::SHOVE::SH_HEAD_MODIFIED, PNS::SHOVE::SH_OK, PNS::ROUTING_SETTINGS::SmoothDraggedSegments(), PNS::LINE::Unmark(), PNS::VIA_HANDLE::valid, and PNS::LINE::Width().

Referenced by Drag().

◆ dragViaMarkObstacles()

bool PNS::DRAGGER::dragViaMarkObstacles ( const VIA_HANDLE aHandle,
NODE aNode,
const VECTOR2I aP 
)
private

Definition at line 265 of file pns_dragger.cpp.

266 {
268 
269  ITEM_SET fanout = findViaFanoutByHandle( aNode, aHandle );
270 
271  if( fanout.Empty() )
272  {
273  return true;
274  }
275 
276  for( ITEM* item : fanout.Items() )
277  {
278  if( const LINE* l = dyn_cast<const LINE*>( item ) )
279  {
280  LINE origLine( *l );
281  LINE draggedLine( *l );
282 
283  draggedLine.DragCorner( aP, origLine.CLine().Find( aHandle.pos ), m_freeAngleMode );
284  draggedLine.ClearLinks();
285 
286  m_draggedItems.Add( draggedLine );
287 
288  m_lastNode->Remove( origLine );
289  m_lastNode->Add( draggedLine );
290  }
291  else if ( VIA *via = dyn_cast<VIA*>( item ) )
292  {
293  auto nvia = Clone( *via );
294 
295  nvia->SetPos( aP );
296  m_draggedItems.Add( nvia.get() );
297 
298  m_lastNode->Remove( via );
299  m_lastNode->Add( std::move( nvia ) );
300  }
301  }
302 
303  return true;
304 }
ITEM_SET m_draggedItems
If true, moves the connection lines without maintaining 45 degrees corners.
Definition: pns_dragger.h:145
Definition: track.h:343
void Add(const LINE &aLine)
Definition: pns_itemset.cpp:32
void Remove(ARC *aArc)
Remove an item from this branch.
Definition: pns_node.cpp:804
NODE * m_lastNode
Definition: pns_dragger.h:134
const ITEM_SET findViaFanoutByHandle(NODE *aNode, const VIA_HANDLE &handle)
std::unique_ptr< typename std::remove_const< T >::type > Clone(const T &aItem)
Definition: pns_item.h:257
bool m_freeAngleMode
Definition: pns_dragger.h:148
bool Add(std::unique_ptr< SEGMENT > aSegment, bool aAllowRedundant=false)
Add an item to the current node.
Definition: pns_node.cpp:615

References PNS::ITEM_SET::Add(), PNS::NODE::Add(), PNS::ITEM_SET::Clear(), PNS::LINK_HOLDER::ClearLinks(), PNS::LINE::CLine(), PNS::Clone(), PNS::LINE::DragCorner(), PNS::ITEM_SET::Empty(), SHAPE_LINE_CHAIN::Find(), findViaFanoutByHandle(), PNS::ITEM_SET::Items(), m_draggedItems, m_freeAngleMode, m_lastNode, PNS::VIA_HANDLE::pos, and PNS::NODE::Remove().

Referenced by dragMarkObstacles().

◆ dragViaWalkaround()

bool PNS::DRAGGER::dragViaWalkaround ( const VIA_HANDLE aHandle,
NODE aNode,
const VECTOR2I aP 
)
private

Definition at line 307 of file pns_dragger.cpp.

308 {
310 
311  ITEM_SET fanout = findViaFanoutByHandle( aNode, aHandle );
312 
313  if( fanout.Empty() )
314  {
315  return true;
316  }
317 
318  bool viaPropOk = false;
319  VECTOR2I viaTargetPos;
320 
321  for( ITEM* item : fanout.Items() )
322  {
323  if ( VIA *via = dyn_cast<VIA*>( item ) )
324  {
325  auto draggedVia = Clone( *via );
326 
327  draggedVia->SetPos( aP );
328  m_draggedItems.Add( draggedVia.get() );
329 
330  std::set<VIA*> vias;
331 
332  vias.insert( draggedVia.get() );
333 
334  bool ok = propagateViaForces( m_lastNode, vias );
335 
336  if( ok )
337  {
338  viaTargetPos = draggedVia->Pos();
339  viaPropOk = true;
340  m_lastNode->Remove( via );
341  m_lastNode->Add( std::move(draggedVia) );
342  }
343  }
344  }
345 
346  if( !viaPropOk ) // can't force-propagate the via? bummer...
347  return false;
348 
349  for( ITEM* item : fanout.Items() )
350  {
351  if( const LINE* l = dyn_cast<const LINE*>( item ) )
352  {
353  LINE origLine( *l );
354  LINE draggedLine( *l );
355  LINE walkLine( *l );
356 
357  draggedLine.DragCorner( viaTargetPos, origLine.CLine().Find( aHandle.pos ), m_freeAngleMode );
358  draggedLine.ClearLinks();
359 
360  if ( m_world->CheckColliding( &draggedLine ) )
361  {
362  bool ok = tryWalkaround( m_lastNode, draggedLine, walkLine );
363 
364  if( !ok )
365  return false;
366 
367  m_lastNode->Remove( origLine );
368  optimizeAndUpdateDraggedLine( walkLine, origLine, aP );
369  }
370  else
371  {
372  m_draggedItems.Add( draggedLine );
373 
374  m_lastNode->Remove( origLine );
375  m_lastNode->Add( draggedLine );
376  }
377  }
378  }
379 
380  return true;
381 }
ITEM_SET m_draggedItems
If true, moves the connection lines without maintaining 45 degrees corners.
Definition: pns_dragger.h:145
Definition: track.h:343
bool tryWalkaround(NODE *aNode, LINE &aOrig, LINE &aWalk)
bool propagateViaForces(NODE *node, std::set< VIA * > &vias)
Definition: pns_dragger.cpp:50
void optimizeAndUpdateDraggedLine(LINE &aDragged, const LINE &aOrig, const VECTOR2I &aP)
void Add(const LINE &aLine)
Definition: pns_itemset.cpp:32
void Remove(ARC *aArc)
Remove an item from this branch.
Definition: pns_node.cpp:804
NODE * m_lastNode
Definition: pns_dragger.h:134
const ITEM_SET findViaFanoutByHandle(NODE *aNode, const VIA_HANDLE &handle)
std::unique_ptr< typename std::remove_const< T >::type > Clone(const T &aItem)
Definition: pns_item.h:257
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:427
bool m_freeAngleMode
Definition: pns_dragger.h:148
bool Add(std::unique_ptr< SEGMENT > aSegment, bool aAllowRedundant=false)
Add an item to the current node.
Definition: pns_node.cpp:615

References PNS::ITEM_SET::Add(), PNS::NODE::Add(), PNS::NODE::CheckColliding(), PNS::ITEM_SET::Clear(), PNS::LINK_HOLDER::ClearLinks(), PNS::LINE::CLine(), PNS::Clone(), PNS::LINE::DragCorner(), PNS::ITEM_SET::Empty(), SHAPE_LINE_CHAIN::Find(), findViaFanoutByHandle(), PNS::ITEM_SET::Items(), m_draggedItems, m_freeAngleMode, m_lastNode, PNS::DRAG_ALGO::m_world, optimizeAndUpdateDraggedLine(), PNS::VIA_HANDLE::pos, propagateViaForces(), PNS::NODE::Remove(), and tryWalkaround().

Referenced by dragWalkaround().

◆ dragWalkaround()

bool PNS::DRAGGER::dragWalkaround ( const VECTOR2I aP)
private

Definition at line 461 of file pns_dragger.cpp.

462 {
463  bool ok = false;
464 // fixme: rewrite using shared_ptr...
465  if( m_lastNode )
466  {
467  delete m_lastNode;
468  m_lastNode = nullptr;
469  }
470 
472 
473  switch( m_mode )
474  {
475  case DM_SEGMENT:
476  case DM_CORNER:
477  {
478  int thresh = Settings().SmoothDraggedSegments() ? m_draggedLine.Width() / 4 : 0;
479  LINE dragged( m_draggedLine );
480  LINE draggedWalk( m_draggedLine );
481  LINE origLine( m_draggedLine );
482 
483  dragged.SetSnapThreshhold( thresh );
484 
485  if( m_mode == DM_SEGMENT )
486  dragged.DragSegment( aP, m_draggedSegmentIndex );
487  else
488  dragged.DragCorner( aP, m_draggedSegmentIndex );
489 
490  if ( m_world->CheckColliding( &dragged ) )
491  {
492  ok = tryWalkaround( m_lastNode, dragged, draggedWalk );
493  }
494  else
495  {
496  draggedWalk = dragged;
497  ok = true;
498  }
499 
500  if( ok )
501  {
502  //Dbg()->AddLine( origLine.CLine(), 4, 100000 );
503  m_lastNode->Remove( origLine );
504  optimizeAndUpdateDraggedLine( draggedWalk, origLine, aP );
505  }
506  break;
507  }
508  case DM_VIA: // fixme...
509  {
511  break;
512  }
513  }
514 
515  m_dragStatus = ok;
516 
517  return true;
518 }
bool tryWalkaround(NODE *aNode, LINE &aOrig, LINE &aWalk)
bool m_dragStatus
Definition: pns_dragger.h:139
void optimizeAndUpdateDraggedLine(LINE &aDragged, const LINE &aOrig, const VECTOR2I &aP)
LINE m_draggedLine
Definition: pns_dragger.h:136
NODE * Branch()
Create a lightweight copy (called branch) of self that tracks the changes (added/removed items) wrs t...
Definition: pns_node.cpp:124
void Remove(ARC *aArc)
Remove an item from this branch.
Definition: pns_node.cpp:804
ROUTING_SETTINGS & Settings() const
Return the logger object, allowing to dump geometry to a file.
int m_draggedSegmentIndex
Definition: pns_dragger.h:138
bool SmoothDraggedSegments() const
Enable/disable smoothing segments during dragging.
bool dragViaWalkaround(const VIA_HANDLE &aHandle, NODE *aNode, const VECTOR2I &aP)
NODE * m_lastNode
Definition: pns_dragger.h:134
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:427
VIA_HANDLE m_initialVia
Definition: pns_dragger.h:131
int Width() const
Return true if the line is geometrically identical as line aOther.
Definition: pns_line.h:156

References PNS::NODE::Branch(), PNS::NODE::CheckColliding(), PNS::DM_CORNER, PNS::DM_SEGMENT, PNS::DM_VIA, PNS::LINE::DragCorner(), PNS::LINE::DragSegment(), dragViaWalkaround(), m_draggedLine, m_draggedSegmentIndex, m_dragStatus, m_initialVia, m_lastNode, m_mode, PNS::DRAG_ALGO::m_world, optimizeAndUpdateDraggedLine(), PNS::NODE::Remove(), PNS::LINE::SetSnapThreshhold(), PNS::ALGO_BASE::Settings(), PNS::ROUTING_SETTINGS::SmoothDraggedSegments(), tryWalkaround(), and PNS::LINE::Width().

Referenced by Drag().

◆ findViaFanoutByHandle()

const ITEM_SET PNS::DRAGGER::findViaFanoutByHandle ( NODE aNode,
const VIA_HANDLE handle 
)
private

Definition at line 130 of file pns_dragger.cpp.

131 {
132  ITEM_SET rv;
133 
134  JOINT* jt = aNode->FindJoint( handle.pos, handle.layers.Start(), handle.net );
135 
136  if( !jt )
137  return rv;
138 
139  for( ITEM* item : jt->LinkList() )
140  {
141  if( item->OfKind( ITEM::SEGMENT_T | ITEM::ARC_T ) )
142  {
143  int segIndex;
144  LINKED_ITEM* seg = ( LINKED_ITEM*) item;
145  LINE l = aNode->AssembleLine( seg, &segIndex );
146 
147  if( segIndex != 0 )
148  l.Reverse();
149 
150  rv.Add( l );
151  }
152  else if( item->OfKind( ITEM::VIA_T ) )
153  {
154  rv.Add( item );
155  }
156  }
157 
158  return rv;
159 }

References PNS::ITEM_SET::Add(), PNS::ITEM::ARC_T, PNS::NODE::AssembleLine(), PNS::NODE::FindJoint(), PNS::VIA_HANDLE::layers, PNS::JOINT::LinkList(), PNS::VIA_HANDLE::net, PNS::VIA_HANDLE::pos, PNS::LINE::Reverse(), PNS::ITEM::SEGMENT_T, LAYER_RANGE::Start(), and PNS::ITEM::VIA_T.

Referenced by dragViaMarkObstacles(), and dragViaWalkaround().

◆ FixRoute()

bool PNS::DRAGGER::FixRoute ( )
overridevirtual

Function FixRoute()

Checks if the result of current dragging operation is correct and eventually commits it to the world.

Returns
true, if dragging finished with success.

Implements PNS::DRAG_ALGO.

Definition at line 594 of file pns_dragger.cpp.

595 {
596  NODE* node = CurrentNode();
597 
598  if( node )
599  {
600  // If collisions exist, we can fix in shove/smart mode because all tracks to be committed
601  // will be in valid positions (even if the current routing solution to the mouse cursor is
602  // invalid). In other modes, we can only commit if "Allow DRC violations" is enabled.
603  if( !m_dragStatus )
604  {
606  node = CurrentNode();
607 
608  if( !node )
609  return false;
610  }
611 
612  if( !m_dragStatus && !Settings().CanViolateDRC() )
613  return false;
614 
615  Router()->CommitRouting( node );
616  return true;
617  }
618 
619  return false;
620 }
ROUTER * Router() const
Return current router settings.
Definition: pns_algo_base.h:54
bool Drag(const VECTOR2I &aP) override
Function Drag()
void CommitRouting()
Definition: pns_router.cpp:655
bool m_dragStatus
Definition: pns_dragger.h:139
NODE * CurrentNode() const override
Function CurrentNode()
ROUTING_SETTINGS & Settings() const
Return the logger object, allowing to dump geometry to a file.
VECTOR2D m_lastValidPoint
Contains the list of items that are currently modified by the dragger.
Definition: pns_dragger.h:142

References PNS::ROUTER::CommitRouting(), CurrentNode(), Drag(), m_dragStatus, m_lastValidPoint, PNS::ALGO_BASE::Router(), and PNS::ALGO_BASE::Settings().

◆ 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(), Start(), and tryWalkaround().

◆ optimizeAndUpdateDraggedLine()

void PNS::DRAGGER::optimizeAndUpdateDraggedLine ( LINE aDragged,
const LINE aOrig,
const VECTOR2I aP 
)
private

Definition at line 384 of file pns_dragger.cpp.

385 {
386  VECTOR2D lockV;
387  aDragged.ClearLinks();
388  aDragged.Unmark();
389 
390  lockV = aDragged.CLine().NearestPoint( aP );
391 
392  if( Settings().GetOptimizeDraggedTrack() )
393  {
394  OPTIMIZER optimizer( m_lastNode );
395 
396  optimizer.SetEffortLevel( OPTIMIZER::MERGE_SEGMENTS | OPTIMIZER::KEEP_TOPOLOGY );
397 
398  OPT_BOX2I affectedArea = aDragged.ChangedArea( &aOrig );
399  VECTOR2I anchor( aP );
400 
401  if( aDragged.CLine().Find( aP ) < 0 )
402  {
403  anchor = aDragged.CLine().NearestPoint( aP );
404  }
405 
406  optimizer.SetPreserveVertex( anchor );
407 
408  if( affectedArea )
409  {
410  Dbg()->AddPoint( anchor, 3 );
411  Dbg()->AddBox( *affectedArea, 2 );
412  optimizer.SetRestrictArea( *affectedArea );
413  optimizer.Optimize( &aDragged );
414 
415  OPT_BOX2I optArea = *aDragged.ChangedArea( &aOrig );
416  if( optArea )
417  Dbg()->AddBox( *optArea, 4 );
418  }
419  }
420 
421  m_lastNode->Add( aDragged );
423  m_draggedItems.Add( aDragged );
424 }
ITEM_SET m_draggedItems
If true, moves the connection lines without maintaining 45 degrees corners.
Definition: pns_dragger.h:145
virtual void AddPoint(VECTOR2I aP, int aColor, int aSize=100000, const std::string aName="")
virtual void AddBox(BOX2I aB, int aColor, const std::string aName="")
void Add(const LINE &aLine)
Definition: pns_itemset.cpp:32
ROUTING_SETTINGS & Settings() const
Return the logger object, allowing to dump geometry to a file.
DEBUG_DECORATOR * Dbg() const
Definition: pns_algo_base.h:78
Reduce corner cost iteratively.
Definition: pns_optimizer.h:99
NODE * m_lastNode
Definition: pns_dragger.h:134
OPT< BOX2I > OPT_BOX2I
Definition: box2.h:525
bool Add(std::unique_ptr< SEGMENT > aSegment, bool aAllowRedundant=false)
Add an item to the current node.
Definition: pns_node.cpp:615

References PNS::ITEM_SET::Add(), PNS::NODE::Add(), PNS::DEBUG_DECORATOR::AddBox(), PNS::DEBUG_DECORATOR::AddPoint(), PNS::LINE::ChangedArea(), PNS::ITEM_SET::Clear(), PNS::LINK_HOLDER::ClearLinks(), PNS::LINE::CLine(), PNS::ALGO_BASE::Dbg(), SHAPE_LINE_CHAIN::Find(), PNS::OPTIMIZER::KEEP_TOPOLOGY, m_draggedItems, m_lastNode, PNS::OPTIMIZER::MERGE_SEGMENTS, SHAPE_LINE_CHAIN::NearestPoint(), PNS::OPTIMIZER::Optimize(), PNS::OPTIMIZER::SetEffortLevel(), PNS::OPTIMIZER::SetPreserveVertex(), PNS::OPTIMIZER::SetRestrictArea(), PNS::ALGO_BASE::Settings(), and PNS::LINE::Unmark().

Referenced by dragShove(), dragViaWalkaround(), and dragWalkaround().

◆ propagateViaForces()

bool PNS::DRAGGER::propagateViaForces ( NODE node,
std::set< VIA * > &  vias 
)
private

Definition at line 50 of file pns_dragger.cpp.

51 {
52  VIA* via = *vias.begin();
53 
54  VECTOR2I force;
56 
57  bool solidsOnly = false;// ( m_currentMode != RM_Walkaround );
58 
59  if( via->PushoutForce( node, lead, force, solidsOnly, 40 ) )
60  {
61  via->SetPos( via->Pos() + force );
62  return true;
63  }
64 
65  return false;
66 }
Definition: track.h:343
MOUSE_TRAIL_TRACER m_mouseTrailTracer
Definition: pns_dragger.h:149

References PNS::MOUSE_TRAIL_TRACER::GetTrailLeadVector(), m_mouseTrailTracer, PNS::VIA::Pos(), PNS::VIA::PushoutForce(), and PNS::VIA::SetPos().

Referenced by dragViaWalkaround().

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

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

◆ SetMode()

void PNS::DRAGGER::SetMode ( int  aDragMode)
overridevirtual

Reimplemented from PNS::DRAG_ALGO.

Definition at line 205 of file pns_dragger.cpp.

206 {
207  m_mode = aMode;
208 }

References m_mode.

◆ Settings()

◆ SetWorld()

virtual void PNS::DRAG_ALGO::SetWorld ( NODE aWorld)
inlinevirtualinherited

Function SetWorld()

Sets the board to work on.

Definition at line 60 of file pns_drag_algo.h.

61  {
62  m_world = aWorld;
63  }

References PNS::DRAG_ALGO::m_world.

◆ Start()

bool PNS::DRAGGER::Start ( const VECTOR2I aP,
ITEM_SET aPrimitives 
)
overridevirtual

Function Start()

Starts routing a single track at point aP, taking item aStartItem as anchor (unless NULL). Returns true if a dragging operation has started.

Implements PNS::DRAG_ALGO.

Definition at line 161 of file pns_dragger.cpp.

162 {
163  if( aPrimitives.Empty() )
164  return false;
165 
166  ITEM* startItem = aPrimitives[0];
167 
168  m_lastNode = NULL;
172  m_lastValidPoint = aP;
173 
176 
178  {
179  m_shove = std::make_unique<SHOVE>( m_world, Router() );
180  m_shove->SetLogger( Logger() );
181  m_shove->SetDebugDecorator( Dbg() );
182  }
183 
184  startItem->Unmark( MK_LOCKED );
185 
186  wxLogTrace( "PNS", "StartDragging: item %p [kind %d]", startItem, (int) startItem->Kind() );
187 
188  switch( startItem->Kind() )
189  {
190  case ITEM::SEGMENT_T:
191  return startDragSegment( aP, static_cast<SEGMENT*>( startItem ) );
192 
193  case ITEM::VIA_T:
194  return startDragVia( static_cast<VIA*>( startItem ) );
195 
196  case ITEM::ARC_T:
197  return startDragArc( aP, static_cast<ARC*>( startItem ) );
198 
199  default:
200  return false;
201  }
202 }
ITEM_SET m_draggedItems
If true, moves the connection lines without maintaining 45 degrees corners.
Definition: pns_dragger.h:145
ROUTER * Router() const
Return current router settings.
Definition: pns_algo_base.h:54
std::unique_ptr< SHOVE > m_shove
Definition: pns_dragger.h:137
virtual LOGGER * Logger()
bool startDragSegment(const VECTOR2D &aP, SEGMENT *aSeg)
Definition: pns_dragger.cpp:68
bool startDragArc(const VECTOR2D &aP, ARC *aArc)
bool startDragVia(VIA *aVia)
ROUTING_SETTINGS & Settings() const
Return the logger object, allowing to dump geometry to a file.
#define NULL
DEBUG_DECORATOR * Dbg() const
Definition: pns_algo_base.h:78
void AddTrailPoint(const VECTOR2I &aP)
PNS_MODE Mode() const
Set the routing mode.
MOUSE_TRAIL_TRACER m_mouseTrailTracer
Definition: pns_dragger.h:149
NODE * m_lastNode
Definition: pns_dragger.h:134
PNS_MODE m_currentMode
Definition: pns_dragger.h:140
bool m_freeAngleMode
Definition: pns_dragger.h:148
VECTOR2D m_lastValidPoint
Contains the list of items that are currently modified by the dragger.
Definition: pns_dragger.h:142

References PNS::MOUSE_TRAIL_TRACER::AddTrailPoint(), PNS::ITEM::ARC_T, PNS::MOUSE_TRAIL_TRACER::Clear(), PNS::ITEM_SET::Clear(), PNS::ALGO_BASE::Dbg(), PNS::DM_FREE_ANGLE, PNS::ITEM_SET::Empty(), PNS::ITEM::Kind(), PNS::ALGO_BASE::Logger(), m_currentMode, m_draggedItems, m_freeAngleMode, m_lastNode, m_lastValidPoint, m_mode, m_mouseTrailTracer, m_shove, PNS::DRAG_ALGO::m_world, PNS::MK_LOCKED, PNS::ROUTING_SETTINGS::Mode(), NULL, PNS::RM_Shove, PNS::ALGO_BASE::Router(), PNS::ITEM::SEGMENT_T, PNS::ALGO_BASE::Settings(), startDragArc(), startDragSegment(), startDragVia(), PNS::ITEM::Unmark(), and PNS::ITEM::VIA_T.

◆ startDragArc()

bool PNS::DRAGGER::startDragArc ( const VECTOR2D aP,
ARC aArc 
)
private

Definition at line 110 of file pns_dragger.cpp.

111 {
113  m_shove->SetInitialLine( m_draggedLine );
114  m_mode = DM_ARC;
115 
116  return true;
117 }
std::unique_ptr< SHOVE > m_shove
Definition: pns_dragger.h:137
LINE m_draggedLine
Definition: pns_dragger.h:136
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:912
int m_draggedSegmentIndex
Definition: pns_dragger.h:138

References PNS::NODE::AssembleLine(), PNS::DM_ARC, m_draggedLine, m_draggedSegmentIndex, m_mode, m_shove, and PNS::DRAG_ALGO::m_world.

Referenced by Start().

◆ startDragSegment()

bool PNS::DRAGGER::startDragSegment ( const VECTOR2D aP,
SEGMENT aSeg 
)
private

Definition at line 68 of file pns_dragger.cpp.

69 {
70  int w2 = aSeg->Width() / 2;
71 
73 
74  if( m_shove )
75  {
76  m_shove->SetInitialLine( m_draggedLine );
77  }
78 
79  auto distA = ( aP - aSeg->Seg().A ).EuclideanNorm();
80  auto distB = ( aP - aSeg->Seg().B ).EuclideanNorm();
81 
82  if( distA <= w2 )
83  {
84  m_mode = DM_CORNER;
85  }
86  else if( distB <= w2 )
87  {
88  //todo (snh) Adjust segment for arcs
90  m_mode = DM_CORNER;
91  }
92  else if ( m_freeAngleMode )
93  {
94  if( distB < distA )
95  {
97  }
98  m_mode = DM_CORNER;
99  }
100  else
101  {
102  m_mode = DM_SEGMENT;
103  }
104 
105  return true;
106 }
double EuclideanNorm(const wxPoint &vector)
Euclidean norm of a 2D vector.
Definition: trigo.h:148
std::unique_ptr< SHOVE > m_shove
Definition: pns_dragger.h:137
LINE m_draggedLine
Definition: pns_dragger.h:136
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:912
int m_draggedSegmentIndex
Definition: pns_dragger.h:138
bool m_freeAngleMode
Definition: pns_dragger.h:148

References SEG::A, PNS::NODE::AssembleLine(), SEG::B, PNS::DM_CORNER, PNS::DM_SEGMENT, EuclideanNorm(), m_draggedLine, m_draggedSegmentIndex, m_freeAngleMode, m_mode, m_shove, PNS::DRAG_ALGO::m_world, PNS::SEGMENT::Seg(), and PNS::SEGMENT::Width().

Referenced by Start().

◆ startDragVia()

bool PNS::DRAGGER::startDragVia ( VIA aVia)
private

Definition at line 120 of file pns_dragger.cpp.

121 {
122  m_initialVia = aVia->MakeHandle();
124 
125  m_mode = DM_VIA;
126 
127  return true;
128 }
VIA_HANDLE m_draggedVia
Definition: pns_dragger.h:132
VIA_HANDLE m_initialVia
Definition: pns_dragger.h:131

References PNS::DM_VIA, m_draggedVia, m_initialVia, m_mode, and PNS::VIA::MakeHandle().

Referenced by Start().

◆ Traces()

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

Function Traces()

Returns the set of dragged items.

Implements PNS::DRAG_ALGO.

Definition at line 668 of file pns_dragger.cpp.

669 {
670  return m_draggedItems;
671 }
ITEM_SET m_draggedItems
If true, moves the connection lines without maintaining 45 degrees corners.
Definition: pns_dragger.h:145

References m_draggedItems.

◆ tryWalkaround()

bool PNS::DRAGGER::tryWalkaround ( NODE aNode,
LINE aOrig,
LINE aWalk 
)
private

Definition at line 427 of file pns_dragger.cpp.

428 {
429  WALKAROUND walkaround( aNode, Router() );
430  bool ok = false;
431  walkaround.SetSolidsOnly( false );
432  walkaround.SetDebugDecorator( Dbg() );
433  walkaround.SetLogger( Logger() );
434  walkaround.SetIterationLimit( Settings().WalkaroundIterationLimit() );
435 
436  aWalk = aOrig;
437 
438  WALKAROUND::RESULT wr = walkaround.Route( aWalk );
439 
440 
441  if( wr.statusCcw == WALKAROUND::DONE && wr.statusCw == WALKAROUND::DONE )
442  {
443  aWalk = ( wr.lineCw.CLine().Length() < wr.lineCcw.CLine().Length() ? wr.lineCw :
444  wr.lineCcw );
445  ok = true;
446  }
447  else if( wr.statusCw == WALKAROUND::DONE )
448  {
449  aWalk = wr.lineCw;
450  ok = true;
451  }
452  else if( wr.statusCcw == WALKAROUND::DONE )
453  {
454  aWalk = wr.lineCcw;
455  ok = true;
456  }
457  return ok;
458 }
ROUTER * Router() const
Return current router settings.
Definition: pns_algo_base.h:54
virtual LOGGER * Logger()
ROUTING_SETTINGS & Settings() const
Return the logger object, allowing to dump geometry to a file.
DEBUG_DECORATOR * Dbg() const
Definition: pns_algo_base.h:78

References PNS::LINE::CLine(), PNS::ALGO_BASE::Dbg(), PNS::WALKAROUND::DONE, SHAPE_LINE_CHAIN::Length(), PNS::WALKAROUND::RESULT::lineCcw, PNS::WALKAROUND::RESULT::lineCw, PNS::ALGO_BASE::Logger(), PNS::WALKAROUND::Route(), PNS::ALGO_BASE::Router(), PNS::ALGO_BASE::SetDebugDecorator(), PNS::WALKAROUND::SetIterationLimit(), PNS::ALGO_BASE::SetLogger(), PNS::WALKAROUND::SetSolidsOnly(), PNS::ALGO_BASE::Settings(), PNS::WALKAROUND::RESULT::statusCcw, and PNS::WALKAROUND::RESULT::statusCw.

Referenced by dragViaWalkaround(), and dragWalkaround().

◆ VisibleViewArea()

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

Definition at line 39 of file pns_algo_base.cpp.

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

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

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

Member Data Documentation

◆ m_currentMode

PNS_MODE PNS::DRAGGER::m_currentMode
private

Definition at line 140 of file pns_dragger.h.

Referenced by Drag(), DRAGGER(), and Start().

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

ITEM_SET PNS::DRAGGER::m_draggedItems
private

If true, moves the connection lines without maintaining 45 degrees corners.

Definition at line 145 of file pns_dragger.h.

Referenced by dragMarkObstacles(), dragShove(), dragViaMarkObstacles(), dragViaWalkaround(), optimizeAndUpdateDraggedLine(), Start(), and Traces().

◆ m_draggedLine

LINE PNS::DRAGGER::m_draggedLine
private

◆ m_draggedSegmentIndex

int PNS::DRAGGER::m_draggedSegmentIndex
private

◆ m_draggedVia

VIA_HANDLE PNS::DRAGGER::m_draggedVia
private

Definition at line 132 of file pns_dragger.h.

Referenced by dragShove(), and startDragVia().

◆ m_dragStatus

bool PNS::DRAGGER::m_dragStatus
private

Definition at line 139 of file pns_dragger.h.

Referenced by DRAGGER(), dragMarkObstacles(), dragShove(), dragWalkaround(), and FixRoute().

◆ m_freeAngleMode

bool PNS::DRAGGER::m_freeAngleMode
private

◆ m_initialVia

VIA_HANDLE PNS::DRAGGER::m_initialVia
private

Definition at line 131 of file pns_dragger.h.

Referenced by dragMarkObstacles(), dragWalkaround(), and startDragVia().

◆ m_lastNode

◆ m_lastValidPoint

VECTOR2D PNS::DRAGGER::m_lastValidPoint
private

Contains the list of items that are currently modified by the dragger.

Definition at line 142 of file pns_dragger.h.

Referenced by Drag(), FixRoute(), 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(), and PNS::WALKAROUND::singleStep().

◆ m_mode

int PNS::DRAGGER::m_mode
private

◆ m_mouseTrailTracer

MOUSE_TRAIL_TRACER PNS::DRAGGER::m_mouseTrailTracer
private

Definition at line 149 of file pns_dragger.h.

Referenced by Drag(), propagateViaForces(), and Start().

◆ m_origViaConnections

ITEM_SET PNS::DRAGGER::m_origViaConnections
private

Definition at line 141 of file pns_dragger.h.

◆ m_router

◆ m_shove

std::unique_ptr<SHOVE> PNS::DRAGGER::m_shove
private

Definition at line 137 of file pns_dragger.h.

Referenced by dragShove(), Start(), startDragArc(), and startDragSegment().

◆ m_world


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