| 
    KiCad PCB EDA Suite
    
   | 
 
#include <pns_placement_algo.h>
  
Public Member Functions | |
| PLACEMENT_ALGO (ROUTER *aRouter) | |
| virtual | ~PLACEMENT_ALGO () | 
| virtual bool | Start (const VECTOR2I &aP, ITEM *aStartItem)=0 | 
| Function Start()   | |
| virtual bool | Move (const VECTOR2I &aP, ITEM *aEndItem)=0 | 
| Function Move()   | |
| virtual bool | FixRoute (const VECTOR2I &aP, ITEM *aEndItem, bool aForceFinish=false)=0 | 
| Function FixRoute()   | |
| virtual std::optional< VECTOR2I > | UnfixRoute () | 
| virtual bool | CommitPlacement () | 
| virtual bool | AbortPlacement () | 
| virtual bool | HasPlacedAnything () const | 
| virtual bool | ToggleVia (bool aEnabled) | 
| Function ToggleVia()   | |
| virtual bool | IsPlacingVia () const | 
| Function IsPlacingVia()   | |
| virtual bool | SetLayer (int aLayer) | 
| Function SetLayer()   | |
| virtual const ITEM_SET | Traces ()=0 | 
| Function Traces()   | |
| virtual const VECTOR2I & | CurrentStart () const =0 | 
| Function CurrentStart()   | |
| virtual const VECTOR2I & | CurrentEnd () const =0 | 
| Function CurrentEnd()   | |
| virtual const std::vector< NET_HANDLE > | CurrentNets () const =0 | 
| Function CurrentNets()   | |
| virtual int | CurrentLayer () const =0 | 
| Function CurrentLayer()   | |
| virtual NODE * | CurrentNode (bool aLoopsRemoved=false) const =0 | 
| Function CurrentNode()   | |
| virtual void | FlipPosture () | 
| Function FlipPosture()   | |
| virtual void | UpdateSizes (const SIZES_SETTINGS &aSizes) | 
| Function UpdateSizes()   | |
| virtual void | SetOrthoMode (bool aOrthoMode) | 
| Function SetOrthoMode()   | |
| virtual void | GetModifiedNets (std::vector< NET_HANDLE > &aNets) const | 
| Function GetModifiedNets.   | |
| ROUTER * | Router () const | 
| Return current router settings.   | |
| ROUTING_SETTINGS & | Settings () const | 
| Return the logger object, allowing to dump geometry to a file.   | |
| virtual LOGGER * | Logger () | 
| void | SetLogger (LOGGER *aLogger) | 
| void | SetDebugDecorator (DEBUG_DECORATOR *aDecorator) | 
| Assign a debug decorator allowing this algo to draw extra graphics for visual debugging.   | |
| DEBUG_DECORATOR * | Dbg () const | 
| const BOX2I & | VisibleViewArea () const | 
Protected Attributes | |
| DEBUG_DECORATOR * | m_debugDecorator | 
| ROUTER * | m_router | 
| LOGGER * | m_logger | 
Abstract class for a P&S placement/dragging algorithm. All subtools (drag, single/diff pair routing and meandering) are derived from it.
Definition at line 45 of file pns_placement_algo.h.
      
  | 
  inline | 
Definition at line 48 of file pns_placement_algo.h.
References PNS::ALGO_BASE::ALGO_BASE().
Referenced by PNS::DIFF_PAIR_PLACER::DIFF_PAIR_PLACER(), PNS::LINE_PLACER::LINE_PLACER(), and PNS::MEANDER_PLACER_BASE::MEANDER_PLACER_BASE().
      
  | 
  inlinevirtual | 
Definition at line 51 of file pns_placement_algo.h.
      
  | 
  inlinevirtual | 
Reimplemented in PNS::DIFF_PAIR_PLACER, PNS::DP_MEANDER_PLACER, PNS::LINE_PLACER, and PNS::MEANDER_PLACER.
Definition at line 85 of file pns_placement_algo.h.
      
  | 
  inlinevirtual | 
Reimplemented in PNS::DIFF_PAIR_PLACER, PNS::DP_MEANDER_PLACER, PNS::LINE_PLACER, and PNS::MEANDER_PLACER.
Definition at line 83 of file pns_placement_algo.h.
      
  | 
  pure virtual | 
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.
Implemented in PNS::DIFF_PAIR_PLACER, PNS::DP_MEANDER_PLACER, PNS::LINE_PLACER, and PNS::MEANDER_PLACER.
Referenced by PNS::ROUTER::ContinueFromEnd(), and PNS::ROUTER::Finish().
      
  | 
  pure virtual | 
Function CurrentLayer()
Returns the layer of currently routed track.
Implemented in PNS::DIFF_PAIR_PLACER, PNS::DP_MEANDER_PLACER, PNS::LINE_PLACER, and PNS::MEANDER_PLACER.
Referenced by PNS::MEANDER_PLACER_BASE::Clearance(), and PNS::ROUTER::GetNearestRatnestAnchor().
      
  | 
  pure virtual | 
Function CurrentNets()
Returns the net(s) of currently routed track(s).
Implemented in PNS::DIFF_PAIR_PLACER, PNS::DP_MEANDER_PLACER, PNS::LINE_PLACER, and PNS::MEANDER_PLACER.
Referenced by PNS::ROUTER::GetNearestRatnestAnchor().
      
  | 
  pure virtual | 
Function CurrentNode()
Returns the most recent board state.
Implemented in PNS::DIFF_PAIR_PLACER, PNS::DP_MEANDER_PLACER, PNS::LINE_PLACER, and PNS::MEANDER_PLACER.
Referenced by PNS::ROUTER::GetNearestRatnestAnchor().
      
  | 
  pure virtual | 
Function CurrentStart()
Returns the current start of the line(s) being placed/tuned.
Implemented in PNS::DIFF_PAIR_PLACER, PNS::DP_MEANDER_PLACER, PNS::LINE_PLACER, and PNS::MEANDER_PLACER.
Referenced by PNS::ROUTER::GetNearestRatnestAnchor().
      
  | 
  inlineinherited | 
Definition at line 78 of file pns_algo_base.h.
References m_debugDecorator.
Referenced by PNS::SHOVE::AddLockedSpringbackNode(), PNS::LINE_PLACER::buildInitialLine(), PNS::LINE_PLACER::clipAndCheckCollisions(), PNS::MEANDER_PLACER::doMove(), PNS::COMPONENT_DRAGGER::Drag(), PNS::MULTI_DRAGGER::Drag(), PNS::DRAGGER::dragShove(), PNS::DRAGGER::dragWalkaround(), PNS::MULTI_DRAGGER::findNewLeaderSegment(), PNS::SHOVE::fixupViaCollisions(), PNS::LINE_PLACER::handlePullback(), PNS::LINE_PLACER::mergeHead(), PNS::DP_MEANDER_PLACER::Move(), PNS::MEANDER_SKEW_PLACER::Move(), PNS::MULTI_DRAGGER::multidragShove(), PNS::MULTI_DRAGGER::multidragWalkaround(), PNS::SHOVE::onCollidingArc(), PNS::SHOVE::onCollidingLine(), PNS::SHOVE::onCollidingSegment(), PNS::SHOVE::onCollidingSolid(), PNS::SHOVE::onCollidingVia(), PNS::SHOVE::onReverseCollidingVia(), PNS::DRAGGER::optimizeAndUpdateDraggedLine(), PNS::LINE_PLACER::optimizeTailHeadTransition(), PNS::SHOVE::preShoveCleanup(), PNS::SHOVE::pruneLineFromOptimizerQueue(), PNS::SHOVE::pruneRootLines(), PNS::SHOVE::pushLineStack(), PNS::SHOVE::pushOrShoveVia(), PNS::SHOVE::pushSpringback(), PNS::SHOVE::reconstructHeads(), PNS::SHOVE::reduceSpringback(), PNS::LINE_PLACER::reduceTail(), PNS::LINE_PLACER::removeLoops(), PNS::SHOVE::replaceItems(), PNS::SHOVE::replaceLine(), PNS::LINE_PLACER::rhShoveOnly(), PNS::LINE_PLACER::rhWalkBase(), PNS::LINE_PLACER::rhWalkOnly(), PNS::WALKAROUND::Route(), PNS::LINE_PLACER::routeStep(), PNS::SHOVE::Run(), PNS::SHOVE::runOptimizer(), PNS::SHOVE::shoveIteration(), PNS::SHOVE::shoveLineToHullSet(), PNS::SHOVE::shoveMainLoop(), PNS::SHOVE::ShoveObstacleLine(), PNS::LINE_PLACER::simplifyNewLine(), PNS::WALKAROUND::singleStep(), PNS::LINE_PLACER::splitHeadTail(), PNS::DRAGGER::Start(), PNS::LINE_PLACER::Start(), PNS::MULTI_DRAGGER::Start(), PNS::SHOVE::touchRootLine(), PNS::SHOVE::touchRootLine(), PNS::LINE_PLACER::Trace(), PNS::DRAGGER::tryWalkaround(), and PNS::MULTI_DRAGGER::tryWalkaround().
      
  | 
  pure virtual | 
Function FixRoute()
Commits the currently routed items to the parent node, taking aP as the final end point and aEndItem as the final anchor (if provided).
Implemented in PNS::DIFF_PAIR_PLACER, PNS::DP_MEANDER_PLACER, PNS::LINE_PLACER, and PNS::MEANDER_PLACER.
      
  | 
  inlinevirtual | 
Function FlipPosture()
Toggles the current posture (straight/diagonal) of the trace head.
Reimplemented in PNS::DIFF_PAIR_PLACER, and PNS::LINE_PLACER.
Definition at line 167 of file pns_placement_algo.h.
      
  | 
  inlinevirtual | 
Function GetModifiedNets.
Returns the nets of all currently routed trace(s)
Reimplemented in PNS::DIFF_PAIR_PLACER, and PNS::LINE_PLACER.
Definition at line 198 of file pns_placement_algo.h.
      
  | 
  inlinevirtual | 
Reimplemented in PNS::DIFF_PAIR_PLACER, PNS::DP_MEANDER_PLACER, PNS::LINE_PLACER, and PNS::MEANDER_PLACER.
Definition at line 87 of file pns_placement_algo.h.
      
  | 
  inlinevirtual | 
Function IsPlacingVia()
Returns true if the placer is placing a via (or more vias).
Reimplemented in PNS::DIFF_PAIR_PLACER, and PNS::LINE_PLACER.
Definition at line 104 of file pns_placement_algo.h.
      
  | 
  virtualinherited | 
Definition at line 34 of file pns_algo_base.cpp.
References m_logger.
Referenced by PNS::LINE_PLACER::rhShoveOnly(), PNS::LINE_PLACER::rhWalkBase(), PNS::DRAGGER::Start(), PNS::MULTI_DRAGGER::Start(), PNS::DRAGGER::tryWalkaround(), and PNS::MULTI_DRAGGER::tryWalkaround().
Function Move()
Moves the end of the currently routed primtive(s) to the point aP, taking aEndItem as the anchor (if not NULL). (unless NULL).
Implemented in PNS::DIFF_PAIR_PLACER, PNS::DP_MEANDER_PLACER, PNS::LINE_PLACER, PNS::MEANDER_PLACER, and PNS::MEANDER_SKEW_PLACER.
      
  | 
  inlineinherited | 
Return current router settings.
Definition at line 54 of file pns_algo_base.h.
References m_router.
Referenced by PNS::DIFF_PAIR_PLACER::attemptWalk(), PNS::MEANDER_PLACER_BASE::Clearance(), PNS::DIFF_PAIR_PLACER::CommitPlacement(), PNS::DP_MEANDER_PLACER::CommitPlacement(), PNS::LINE_PLACER::CommitPlacement(), PNS::MEANDER_PLACER::CommitPlacement(), PNS::COMPONENT_DRAGGER::FixRoute(), PNS::DIFF_PAIR_PLACER::FixRoute(), PNS::DRAGGER::FixRoute(), PNS::MULTI_DRAGGER::FixRoute(), PNS::DIFF_PAIR_PLACER::initPlacement(), PNS::LINE_PLACER::initPlacement(), PNS::MEANDER_PLACER_BASE::lineDelay(), PNS::MEANDER_PLACER_BASE::lineLength(), PNS::LINE_PLACER::makeVia(), PNS::MULTI_DRAGGER::multidragShove(), PNS::SHOVE::onCollidingSolid(), PNS::SHOVE::reconstructHeads(), PNS::SHOVE::removeHeads(), PNS::LINE_PLACER::rhWalkBase(), PNS::SHOVE::Run(), PNS::SHOVE::runOptimizer(), PNS::SHOVE::shoveIteration(), PNS::DIFF_PAIR_PLACER::Start(), PNS::DP_MEANDER_PLACER::Start(), PNS::DRAGGER::Start(), PNS::LINE_PLACER::Start(), PNS::MEANDER_PLACER::Start(), PNS::MEANDER_SKEW_PLACER::Start(), PNS::MULTI_DRAGGER::Start(), PNS::DRAGGER::tryWalkaround(), and PNS::MULTI_DRAGGER::tryWalkaround().
      
  | 
  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.
References m_debugDecorator.
Referenced by PNS::SHOVE::onCollidingSolid(), PNS::LINE_PLACER::rhWalkBase(), PNS::SHOVE::SHOVE(), PNS::DRAGGER::tryWalkaround(), and PNS::MULTI_DRAGGER::tryWalkaround().
      
  | 
  inlinevirtual | 
Function SetLayer()
Sets the current routing layer.
Reimplemented in PNS::DIFF_PAIR_PLACER, and PNS::LINE_PLACER.
Definition at line 114 of file pns_placement_algo.h.
      
  | 
  inlineinherited | 
Definition at line 65 of file pns_algo_base.h.
References m_logger.
Referenced by PNS::LINE_PLACER::rhWalkBase(), PNS::DRAGGER::tryWalkaround(), and PNS::MULTI_DRAGGER::tryWalkaround().
      
  | 
  inlinevirtual | 
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::DIFF_PAIR_PLACER, and PNS::LINE_PLACER.
Definition at line 189 of file pns_placement_algo.h.
      
  | 
  inherited | 
Return the logger object, allowing to dump geometry to a file.
Definition at line 28 of file pns_algo_base.cpp.
References m_router.
Referenced by PNS::DIFF_PAIR_PLACER::attemptWalk(), PNS::LINE_PLACER::buildInitialLine(), PNS::LINE_PLACER::CommitPlacement(), PNS::MULTI_DRAGGER::Drag(), PNS::DRAGGER::dragMarkObstacles(), PNS::DRAGGER::dragShove(), PNS::DRAGGER::dragWalkaround(), PNS::COMPONENT_DRAGGER::FixRoute(), PNS::DIFF_PAIR_PLACER::FixRoute(), PNS::LINE_PLACER::FixRoute(), PNS::MULTI_DRAGGER::FixRoute(), PNS::LINE_PLACER::Move(), PNS::SHOVE::onCollidingSolid(), PNS::DRAGGER::optimizeAndUpdateDraggedLine(), PNS::DIFF_PAIR_PLACER::propagateDpHeadForces(), PNS::DRAGGER::propagateViaForces(), PNS::SHOVE::pushOrShoveVia(), PNS::LINE_PLACER::rhMarkObstacles(), PNS::LINE_PLACER::rhShoveOnly(), PNS::LINE_PLACER::rhWalkBase(), PNS::LINE_PLACER::rhWalkOnly(), PNS::DIFF_PAIR_PLACER::route(), PNS::LINE_PLACER::routeHead(), PNS::LINE_PLACER::routeStep(), PNS::SHOVE::runOptimizer(), PNS::SHOVE::shoveMainLoop(), PNS::WALKAROUND::singleStep(), PNS::DRAGGER::Start(), PNS::LINE_PLACER::Start(), PNS::MULTI_DRAGGER::Start(), PNS::DRAGGER::tryWalkaround(), PNS::MULTI_DRAGGER::tryWalkaround(), PNS::LINE_PLACER::UnfixRoute(), and PNS::WALKAROUND::WALKAROUND().
Function Start()
Starts placement/drag operation at point aP, taking item aStartItem as anchor (unless NULL).
Implemented in PNS::DIFF_PAIR_PLACER, PNS::DP_MEANDER_PLACER, PNS::LINE_PLACER, PNS::MEANDER_PLACER, and PNS::MEANDER_SKEW_PLACER.
      
  | 
  inlinevirtual | 
Function ToggleVia()
Enables/disables a via at the end of currently routed trace.
Reimplemented in PNS::DIFF_PAIR_PLACER, and PNS::LINE_PLACER.
Definition at line 94 of file pns_placement_algo.h.
      
  | 
  pure virtual | 
Function Traces()
Returns all routed/tuned traces.
Implemented in PNS::DIFF_PAIR_PLACER, PNS::DP_MEANDER_PLACER, PNS::LINE_PLACER, and PNS::MEANDER_PLACER.
Referenced by PNS::MEANDER_PLACER_BASE::Clearance(), PNS::ROUTER::ContinueFromEnd(), PNS::ROUTER::Finish(), and PNS::ROUTER::GetNearestRatnestAnchor().
      
  | 
  inlinevirtual | 
Reimplemented in PNS::LINE_PLACER.
Definition at line 81 of file pns_placement_algo.h.
      
  | 
  inlinevirtual | 
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::DIFF_PAIR_PLACER, and PNS::LINE_PLACER.
Definition at line 178 of file pns_placement_algo.h.
      
  | 
  inherited | 
Definition at line 40 of file pns_algo_base.cpp.
References m_router.
Referenced by PNS::SHOVE::runOptimizer().
      
  | 
  protectedinherited | 
Definition at line 86 of file pns_algo_base.h.
Referenced by ALGO_BASE(), Dbg(), and SetDebugDecorator().
      
  | 
  protectedinherited | 
Definition at line 88 of file pns_algo_base.h.
Referenced by ALGO_BASE(), Logger(), and SetLogger().
      
  | 
  protectedinherited | 
Definition at line 87 of file pns_algo_base.h.
Referenced by ALGO_BASE(), PNS::DP_MEANDER_PLACER::calculateTimeDomainTargets(), PNS::MEANDER_PLACER::calculateTimeDomainTargets(), PNS::MEANDER_SKEW_PLACER::calculateTimeDomainTargets(), PNS::MEANDER_PLACER::doMove(), PNS::LINE_PLACER::FixRoute(), PNS::DP_MEANDER_PLACER::Move(), PNS::MEANDER_SKEW_PLACER::Move(), Router(), Settings(), PNS::DIFF_PAIR_PLACER::updateLeadingRatLine(), PNS::LINE_PLACER::updateLeadingRatLine(), and VisibleViewArea().