KiCad PCB EDA Suite
|
The actual Push and Shove algorithm. More...
#include <pns_shove.h>
Classes | |
struct | SPRINGBACK_TAG |
Public Types | |
enum | SHOVE_STATUS { SH_OK = 0 , SH_NULL , SH_INCOMPLETE , SH_HEAD_MODIFIED , SH_TRY_WALK } |
Public Member Functions | |
SHOVE (NODE *aWorld, ROUTER *aRouter) | |
~SHOVE () | |
SHOVE_STATUS | ShoveLines (const LINE &aCurrentHead) |
SHOVE_STATUS | ShoveMultiLines (const ITEM_SET &aHeadSet) |
SHOVE_STATUS | ShoveDraggingVia (const VIA_HANDLE aOldVia, const VECTOR2I &aWhere, VIA_HANDLE &aNewVia) |
SHOVE_STATUS | ShoveObstacleLine (const LINE &aCurLine, const LINE &aObstacleLine, LINE &aResultLine) |
void | ForceClearance (bool aEnabled, int aClearance) |
NODE * | CurrentNode () |
const LINE | NewHead () const |
void | SetInitialLine (LINE &aInitial) |
bool | AddLockedSpringbackNode (NODE *aNode) |
void | UnlockSpringbackNode (NODE *aNode) |
bool | RewindSpringbackTo (NODE *aNode) |
bool | RewindToLastLockedNode () |
void | DisablePostShoveOptimizations (int aMask) |
void | SetSpringbackDoNotTouchNode (const NODE *aNode) |
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 |
Private Types | |
typedef std::vector< SHAPE_LINE_CHAIN > | HULL_SET |
typedef std::optional< LINE > | OPT_LINE |
typedef std::pair< LINE, LINE > | LINE_PAIR |
typedef std::vector< LINE_PAIR > | LINE_PAIR_VEC |
Private Member Functions | |
SHOVE_STATUS | shoveLineToHullSet (const LINE &aCurLine, const LINE &aObstacleLine, LINE &aResultLine, const HULL_SET &aHulls) |
NODE * | reduceSpringback (const ITEM_SET &aHeadSet, VIA_HANDLE &aDraggedVia) |
bool | pushSpringback (NODE *aNode, const OPT_BOX2I &aAffectedArea, VIA *aDraggedVia) |
SHOVE_STATUS | shoveLineFromLoneVia (const LINE &aCurLine, const LINE &aObstacleLine, LINE &aResultLine) |
bool | checkShoveDirection (const LINE &aCurLine, const LINE &aObstacleLine, const LINE &aShovedLine) const |
SHOVE_STATUS | onCollidingArc (LINE &aCurrent, ARC *aObstacleArc) |
SHOVE_STATUS | onCollidingLine (LINE &aCurrent, LINE &aObstacle) |
SHOVE_STATUS | onCollidingSegment (LINE &aCurrent, SEGMENT *aObstacleSeg) |
SHOVE_STATUS | onCollidingSolid (LINE &aCurrent, ITEM *aObstacle, OBSTACLE &aObstacleInfo) |
SHOVE_STATUS | onCollidingVia (ITEM *aCurrent, VIA *aObstacleVia, OBSTACLE &aObstacleInfo) |
SHOVE_STATUS | onReverseCollidingVia (LINE &aCurrent, VIA *aObstacleVia) |
SHOVE_STATUS | pushOrShoveVia (VIA *aVia, const VECTOR2I &aForce, int aCurrentRank) |
OPT_BOX2I | totalAffectedArea () const |
void | unwindLineStack (const LINKED_ITEM *aSeg) |
void | unwindLineStack (const ITEM *aItem) |
void | runOptimizer (NODE *aNode) |
bool | pushLineStack (const LINE &aL, bool aKeepCurrentOnTop=false) |
void | popLineStack () |
LINE | assembleLine (const LINKED_ITEM *aSeg, int *aIndex=nullptr) |
void | replaceItems (ITEM *aOld, std::unique_ptr< ITEM > aNew) |
void | replaceLine (LINE &aOld, LINE &aNew, bool aIncludeInChangedArea=true, NODE *aNode=nullptr) |
LINE * | findRootLine (LINE *aLine) |
SHOVE_STATUS | shoveIteration (int aIter) |
SHOVE_STATUS | shoveMainLoop () |
int | getClearance (const ITEM *aA, const ITEM *aB) const |
bool | fixupViaCollisions (const LINE *aCurrent, OBSTACLE &obs) |
void | sanityCheck (LINE *aOld, LINE *aNew) |
Private Attributes | |
OPT_BOX2I | m_affectedArea |
std::vector< SPRINGBACK_TAG > | m_nodeStack |
std::vector< LINE > | m_lineStack |
std::vector< LINE > | m_optimizerQueue |
std::unordered_map< const LINKED_ITEM *, LINE * > | m_rootLineHistory |
NODE * | m_root |
NODE * | m_currentNode |
const NODE * | m_springbackDoNotTouchNode |
int | m_restrictSpringbackTagId |
OPT_LINE | m_newHead |
VIA * | m_draggedVia |
int | m_iter |
int | m_forceClearance |
bool | m_multiLineMode |
int | m_optFlagDisableMask |
The actual Push and Shove algorithm.
Definition at line 45 of file pns_shove.h.
|
private |
Definition at line 91 of file pns_shove.h.
|
private |
Definition at line 93 of file pns_shove.h.
|
private |
Definition at line 94 of file pns_shove.h.
|
private |
Definition at line 92 of file pns_shove.h.
Enumerator | |
---|---|
SH_OK | |
SH_NULL | |
SH_INCOMPLETE | |
SH_HEAD_MODIFIED | |
SH_TRY_WALK |
Definition at line 49 of file pns_shove.h.
Definition at line 146 of file pns_shove.cpp.
References PNS::ROUTER_IFACE::GetDebugDecorator(), PNS::ROUTER::GetInterface(), m_currentNode, m_draggedVia, m_forceClearance, m_iter, m_multiLineMode, m_optFlagDisableMask, m_restrictSpringbackTagId, m_root, m_springbackDoNotTouchNode, and PNS::ALGO_BASE::SetDebugDecorator().
PNS::SHOVE::~SHOVE | ( | ) |
Definition at line 164 of file pns_shove.cpp.
References m_rootLineHistory.
bool PNS::SHOVE::AddLockedSpringbackNode | ( | NODE * | aNode | ) |
Definition at line 1965 of file pns_shove.cpp.
References PNS::SHOVE::SPRINGBACK_TAG::m_locked, PNS::SHOVE::SPRINGBACK_TAG::m_node, and m_nodeStack.
|
private |
Definition at line 181 of file pns_shove.cpp.
References PNS::NODE::AssembleLine(), and m_currentNode.
Referenced by onCollidingArc(), onCollidingSegment(), onReverseCollidingVia(), pushOrShoveVia(), and shoveIteration().
|
private |
Definition at line 195 of file pns_shove.cpp.
References SHAPE_LINE_CHAIN::POINT_INSIDE_TRACKER::AddPolyline(), PNS::LINE::CLine(), PNS::LINE::CPoint(), SHAPE_LINE_CHAIN::POINT_INSIDE_TRACKER::IsInside(), and SHAPE_LINE_CHAIN::Reverse().
Referenced by shoveLineToHullSet().
NODE * PNS::SHOVE::CurrentNode | ( | ) |
Definition at line 1944 of file pns_shove.cpp.
References m_nodeStack, and m_root.
|
inlineinherited |
Definition at line 78 of file pns_algo_base.h.
References PNS::ALGO_BASE::m_debugDecorator.
Referenced by PNS::LINE_PLACER::buildInitialLine(), PNS::LINE_PLACER::clipAndCheckCollisions(), PNS::MEANDER_PLACER::doMove(), PNS::COMPONENT_DRAGGER::Drag(), PNS::DRAGGER::dragShove(), PNS::DRAGGER::dragWalkaround(), fixupViaCollisions(), PNS::LINE_PLACER::handlePullback(), PNS::LINE_PLACER::mergeHead(), PNS::DP_MEANDER_PLACER::Move(), PNS::MEANDER_SKEW_PLACER::Move(), onCollidingArc(), onCollidingLine(), onCollidingSegment(), onCollidingSolid(), onCollidingVia(), onReverseCollidingVia(), PNS::DRAGGER::optimizeAndUpdateDraggedLine(), PNS::LINE_PLACER::optimizeTailHeadTransition(), pushLineStack(), pushOrShoveVia(), PNS::LINE_PLACER::reduceTail(), PNS::LINE_PLACER::removeLoops(), replaceLine(), PNS::LINE_PLACER::rhShoveOnly(), PNS::LINE_PLACER::rhWalkBase(), PNS::LINE_PLACER::rhWalkOnly(), PNS::WALKAROUND::Route(), PNS::LINE_PLACER::routeStep(), runOptimizer(), shoveIteration(), ShoveLines(), shoveLineToHullSet(), shoveMainLoop(), ShoveMultiLines(), ShoveObstacleLine(), PNS::WALKAROUND::singleStep(), PNS::LINE_PLACER::splitHeadTail(), PNS::LINE_PLACER::Start(), PNS::DRAGGER::Start(), PNS::LINE_PLACER::Trace(), PNS::DRAGGER::tryWalkaround(), and unwindLineStack().
void PNS::SHOVE::DisablePostShoveOptimizations | ( | int | aMask | ) |
Definition at line 2034 of file pns_shove.cpp.
References m_optFlagDisableMask.
Definition at line 1829 of file pns_shove.cpp.
References PNS::LINK_HOLDER::Links(), and m_rootLineHistory.
Referenced by runOptimizer().
Definition at line 1220 of file pns_shove.cpp.
References SEG::A, PNS::ITEM::ARC_T, SEG::B, PNS::JOINT::CLinks(), PNS::ITEM::Collide(), PNS::ALGO_BASE::Dbg(), PNS::VIA::Diameter(), PNS::NODE::FindJoint(), m_currentNode, PNS::OBSTACLE::m_item, PNS::OBSTACLE::m_maxFanoutWidth, PNS::ITEM::OfKind(), PNS_DBG, PNS::VIA::Pos(), PNS::SEGMENT::Seg(), PNS::ITEM::SEGMENT_T, PNS::VIA::SetDiameter(), PNS::JOINT::Via(), PNS::ITEM::VIA_T, PNS::ARC::Width(), and PNS::SEGMENT::Width().
Referenced by shoveIteration().
|
inline |
Definition at line 69 of file pns_shove.h.
References m_forceClearance.
Referenced by PNS::DIFF_PAIR_PLACER::attemptWalk().
Definition at line 122 of file pns_shove.cpp.
References PNS::NODE::GetClearance(), PNS::ITEM::HasHole(), PNS::ITEM::Hole(), m_currentNode, and m_forceClearance.
Referenced by onCollidingVia(), shoveLineFromLoneVia(), and ShoveObstacleLine().
|
virtualinherited |
Definition at line 34 of file pns_algo_base.cpp.
References PNS::ALGO_BASE::m_logger.
Referenced by PNS::LINE_PLACER::rhShoveOnly(), PNS::LINE_PLACER::rhWalkBase(), PNS::DRAGGER::Start(), and PNS::DRAGGER::tryWalkaround().
const LINE PNS::SHOVE::NewHead | ( | ) | const |
Definition at line 1950 of file pns_shove.cpp.
References m_newHead.
|
private |
Definition at line 548 of file pns_shove.cpp.
References assembleLine(), BLUE, PNS::LINE::CLine(), PNS::ALGO_BASE::Dbg(), GREEN, PNS::LINE::HasLockedSegments(), PNS::ITEM::LayersOverlap(), SHAPE_LINE_CHAIN::Length(), m_multiLineMode, m_newHead, PNS::LINE::Marker(), PNS::MK_HEAD, PNS_DBG, pushLineStack(), PNS::LINE::Rank(), RED, replaceLine(), sanityCheck(), PNS::LINE::SetRank(), SH_INCOMPLETE, SH_OK, SH_TRY_WALK, ShoveObstacleLine(), and WHITE.
Referenced by shoveIteration().
|
private |
Definition at line 606 of file pns_shove.cpp.
References BLUE, PNS::ALGO_BASE::Dbg(), GREEN, m_multiLineMode, m_newHead, PNS::LINE::Marker(), PNS::MK_HEAD, PNS_DBG, pushLineStack(), PNS::LINE::Rank(), RED, replaceLine(), sanityCheck(), PNS::LINE::SetRank(), SH_INCOMPLETE, SH_OK, and ShoveObstacleLine().
Referenced by shoveIteration().
|
private |
Definition at line 484 of file pns_shove.cpp.
References assembleLine(), BLUE, PNS::LINE::CLine(), PNS::ALGO_BASE::Dbg(), PNS::LINE::EndsWithVia(), GREEN, PNS::LINE::HasLockedSegments(), PNS::ITEM::Layer(), PNS::ITEM::LayersOverlap(), SHAPE_LINE_CHAIN::Length(), m_multiLineMode, m_newHead, PNS::LINE::Marker(), PNS::MK_HEAD, PNS_DBG, pushLineStack(), PNS::LINE::Rank(), RED, replaceLine(), sanityCheck(), PNS::LINE::SetRank(), SH_INCOMPLETE, SH_OK, SH_TRY_WALK, and ShoveObstacleLine().
Referenced by shoveIteration().
|
private |
Definition at line 646 of file pns_shove.cpp.
References PNS::TOPOLOGY::AssembleCluster(), BLUE, PNS::LINK_HOLDER::ClearLinks(), PNS::ITEM::Collide(), PNS::ALGO_BASE::Dbg(), PNS::WALKAROUND::DONE, dummy, PNS::LINE::EndsWithVia(), PNS::NODE::FindJoint(), PNS::LINE::HasLoops(), PNS::ITEM::Layers(), PNS::LINE::Line(), PNS::JOINT::LinkList(), m_currentNode, m_lineStack, m_multiLineMode, m_newHead, PNS::LINE::Mark(), PNS::LINE::Marker(), PNS::MK_HEAD, onCollidingVia(), PNS_DBG, PNS_DBGN, popLineStack(), PNS::VIA::Pos(), pushLineStack(), PNS::LINE::Rank(), RED, replaceLine(), PNS::WALKAROUND::RestrictToSet(), PNS::WALKAROUND::Route(), PNS::ALGO_BASE::Router(), sanityCheck(), PNS::ALGO_BASE::SetDebugDecorator(), PNS::WALKAROUND::SetIterationLimit(), PNS::LINE::SetRank(), PNS::WALKAROUND::SetSolidsOnly(), PNS::ALGO_BASE::Settings(), SH_INCOMPLETE, SH_OK, ShoveObstacleLine(), SHAPE_LINE_CHAIN::Simplify(), LAYER_RANGE::Start(), PNS::LINE::Unmark(), via, PNS::LINE::Via(), and PNS::ITEM::VIA_T.
Referenced by shoveIteration().
|
private |
Definition at line 971 of file pns_shove.cpp.
References SHAPE::Collide(), PNS::ALGO_BASE::Dbg(), PNS::VIA::Diameter(), PNS::LINE::EndsWithVia(), getClearance(), LIGHTRED, PNS::ITEM::LINE_T, PNS::OBSTACLE::m_maxFanoutWidth, PNS::ITEM::OfKind(), PNS_DBG, PNS_DBGN, pushOrShoveVia(), PNS::ITEM::Rank(), PNS::VIA::SetDiameter(), SH_INCOMPLETE, PNS::LINE::Shape(), PNS::VIA::Shape(), PNS::ITEM::SOLID_T, PNS::LINE::Via(), and PNS::LINE::Width().
Referenced by onCollidingSolid(), and shoveIteration().
|
private |
Definition at line 1044 of file pns_shove.cpp.
References PNS::LINE::AppendVia(), PNS::ITEM::ARC_T, assembleLine(), BLUE, SHAPE_LINE_CHAIN::Clear(), PNS::LINK_HOLDER::ClearLinks(), PNS::LINE::CLine(), PNS::ALGO_BASE::Dbg(), PNS::LINE::EndsWithVia(), PNS::NODE::FindJoint(), GREEN, LIGHTGREEN, LIGHTRED, PNS::LINE::Line(), PNS::JOINT::LinkList(), m_currentNode, m_iter, PNS_DBG, PNS_DBGN, PNS::VIA::Pos(), pushLineStack(), PNS::LINE::Rank(), PNS::LINE::RemoveVia(), replaceLine(), PNS::ITEM::SEGMENT_T, PNS::LINE::SetRank(), PNS::LINE::SetShape(), SH_INCOMPLETE, SH_OK, ShoveObstacleLine(), unwindLineStack(), PNS::LINE::Via(), and YELLOW.
Referenced by shoveIteration().
|
private |
Definition at line 1194 of file pns_shove.cpp.
References PNS::LINK_HOLDER::Links(), m_lineStack, and m_optimizerQueue.
Referenced by onCollidingSolid(), and shoveIteration().
|
private |
Definition at line 1170 of file pns_shove.cpp.
References BLUE, PNS::ALGO_BASE::Dbg(), PNS::LINE::IsLinkedChecked(), m_lineStack, m_optimizerQueue, PNS_DBG, and PNS::LINE::SegmentCount().
Referenced by onCollidingArc(), onCollidingLine(), onCollidingSegment(), onCollidingSolid(), onReverseCollidingVia(), pushOrShoveVia(), shoveIteration(), ShoveLines(), shoveMainLoop(), and ShoveMultiLines().
|
private |
Definition at line 846 of file pns_shove.cpp.
References PNS::ITEM::ARC_T, assembleLine(), PNS::Clone(), PNS::ALGO_BASE::Dbg(), PNS::NODE::FindJoint(), PNS::ITEM::IsLocked(), PNS::JOINT::IsLocked(), PNS::JOINT::IsStitchingVia(), LIGHTGREEN, LIGHTRED, PNS::JOINT::LinkList(), m_currentNode, m_draggedVia, m_multiLineMode, m_newHead, PNS::ITEM::Marker(), PNS::MK_HEAD, PNS_DBG, PNS::VIA::Pos(), pushLineStack(), PNS::NODE::Remove(), replaceItems(), replaceLine(), VECTOR2< T >::Resize(), PNS::ITEM::SEGMENT_T, PNS::ALGO_BASE::Settings(), SH_INCOMPLETE, SH_OK, SH_TRY_WALK, unwindLineStack(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by onCollidingVia(), and ShoveDraggingVia().
|
private |
Definition at line 806 of file pns_shove.cpp.
References PNS::SHOVE::SPRINGBACK_TAG::m_affectedArea, PNS::SHOVE::SPRINGBACK_TAG::m_draggedVia, PNS::SHOVE::SPRINGBACK_TAG::m_locked, PNS::SHOVE::SPRINGBACK_TAG::m_node, m_nodeStack, PNS::SHOVE::SPRINGBACK_TAG::m_seq, and PNS::VIA::MakeHandle().
Referenced by ShoveDraggingVia(), ShoveLines(), and ShoveMultiLines().
|
private |
Definition at line 771 of file pns_shove.cpp.
References PNS::NODE::CheckColliding(), PNS::SHOVE::SPRINGBACK_TAG::m_draggedVia, PNS::SHOVE::SPRINGBACK_TAG::m_locked, PNS::SHOVE::SPRINGBACK_TAG::m_node, m_nodeStack, m_root, m_springbackDoNotTouchNode, and PNS::VIA_HANDLE::valid.
Referenced by ShoveDraggingVia(), ShoveLines(), and ShoveMultiLines().
Definition at line 49 of file pns_shove.cpp.
References PNS::ChangedArea(), m_affectedArea, m_currentNode, and PNS::NODE::Replace().
Referenced by pushOrShoveVia().
|
private |
Definition at line 60 of file pns_shove.cpp.
References BLUE, PNS::ChangedArea(), PNS::LINE::Clone(), PNS::ALGO_BASE::Dbg(), PNS::LINK_HOLDER::Links(), m_affectedArea, m_currentNode, m_rootLineHistory, PNS_DBG, and PNS::NODE::Replace().
Referenced by onCollidingArc(), onCollidingLine(), onCollidingSegment(), onCollidingSolid(), onReverseCollidingVia(), pushOrShoveVia(), and runOptimizer().
bool PNS::SHOVE::RewindSpringbackTo | ( | NODE * | aNode | ) |
Definition at line 1976 of file pns_shove.cpp.
References PNS::NODE::KillChildren(), and m_nodeStack.
bool PNS::SHOVE::RewindToLastLockedNode | ( | ) |
Definition at line 2005 of file pns_shove.cpp.
References m_nodeStack.
|
inlineinherited |
Return current router settings.
Definition at line 54 of file pns_algo_base.h.
References PNS::ALGO_BASE::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::DRAGGER::FixRoute(), PNS::DIFF_PAIR_PLACER::initPlacement(), PNS::LINE_PLACER::initPlacement(), onCollidingSolid(), PNS::LINE_PLACER::rhWalkBase(), PNS::DIFF_PAIR_PLACER::Start(), PNS::DP_MEANDER_PLACER::Start(), PNS::LINE_PLACER::Start(), PNS::MEANDER_PLACER::Start(), PNS::MEANDER_SKEW_PLACER::Start(), PNS::DRAGGER::Start(), and PNS::DRAGGER::tryWalkaround().
|
private |
Definition at line 1846 of file pns_shove.cpp.
References PNS::ITEM::ANY_T, BLUE, PNS::ALGO_BASE::Dbg(), findRootLine(), PNS::ROUTING_SETTINGS::GetCornerMode(), GREEN, PNS::OPTIMIZER::LIMIT_CORNER_COUNT, m_optFlagDisableMask, m_optimizerQueue, PNS::OPTIMIZER::MERGE_OBTUSE, PNS::OPTIMIZER::MERGE_SEGMENTS, DIRECTION_45::MITERED_45, PNS::MK_HEAD, PNS::OE_FULL, PNS::OE_LOW, PNS::OE_MEDIUM, PNS::OPTIMIZER::Optimize(), PNS::ROUTING_SETTINGS::OptimizerEffort(), PNS_DBG, RED, replaceLine(), PNS::OPTIMIZER::RESTRICT_AREA, DIRECTION_45::ROUNDED_45, PNS::OPTIMIZER::SetCollisionMask(), PNS::OPTIMIZER::SetEffortLevel(), PNS::OPTIMIZER::SetRestrictArea(), PNS::ALGO_BASE::Settings(), PNS::OPTIMIZER::SMART_PADS, totalAffectedArea(), and PNS::ALGO_BASE::VisibleViewArea().
Referenced by ShoveDraggingVia(), ShoveLines(), and ShoveMultiLines().
Definition at line 139 of file pns_shove.cpp.
References PNS::LINE::CPoint().
Referenced by onCollidingArc(), onCollidingLine(), onCollidingSegment(), and onCollidingSolid().
|
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 PNS::ALGO_BASE::m_debugDecorator.
Referenced by onCollidingSolid(), PNS::LINE_PLACER::rhWalkBase(), SHOVE(), and PNS::DRAGGER::tryWalkaround().
void PNS::SHOVE::SetInitialLine | ( | LINE & | aInitial | ) |
Definition at line 1958 of file pns_shove.cpp.
References PNS::NODE::Branch(), m_root, and PNS::NODE::Remove().
|
inlineinherited |
Definition at line 65 of file pns_algo_base.h.
References PNS::ALGO_BASE::m_logger.
Referenced by PNS::LINE_PLACER::rhWalkBase(), and PNS::DRAGGER::tryWalkaround().
void PNS::SHOVE::SetSpringbackDoNotTouchNode | ( | const NODE * | aNode | ) |
Definition at line 2040 of file pns_shove.cpp.
References m_springbackDoNotTouchNode.
|
inherited |
Return the logger object, allowing to dump geometry to a file.
Definition at line 28 of file pns_algo_base.cpp.
References PNS::ALGO_BASE::m_router, and PNS::ROUTER::Settings().
Referenced by PNS::DIFF_PAIR_PLACER::attemptWalk(), PNS::LINE_PLACER::buildInitialLine(), PNS::LINE_PLACER::CommitPlacement(), PNS::DRAGGER::dragMarkObstacles(), PNS::DRAGGER::dragShove(), PNS::DRAGGER::dragWalkaround(), PNS::COMPONENT_DRAGGER::FixRoute(), PNS::DIFF_PAIR_PLACER::FixRoute(), PNS::LINE_PLACER::FixRoute(), PNS::LINE_PLACER::Move(), onCollidingSolid(), PNS::DRAGGER::optimizeAndUpdateDraggedLine(), PNS::DIFF_PAIR_PLACER::propagateDpHeadForces(), PNS::DRAGGER::propagateViaForces(), 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(), runOptimizer(), shoveMainLoop(), PNS::WALKAROUND::singleStep(), PNS::LINE_PLACER::Start(), PNS::DRAGGER::Start(), PNS::DRAGGER::tryWalkaround(), and PNS::LINE_PLACER::UnfixRoute().
SHOVE::SHOVE_STATUS PNS::SHOVE::ShoveDraggingVia | ( | const VIA_HANDLE | aOldVia, |
const VECTOR2I & | aWhere, | ||
VIA_HANDLE & | aNewVia | ||
) |
Definition at line 1752 of file pns_shove.cpp.
References PNS::ITEM_SET::Add(), PNS::NODE::Branch(), PNS::NODE::CheckColliding(), PNS::NODE::ClearRanks(), PNS::findViaByHandle(), m_affectedArea, m_currentNode, m_draggedVia, m_lineStack, m_newHead, m_optimizerQueue, PNS::VIA::MakeHandle(), PNS::ITEM::Mark(), PNS::MK_HEAD, PNS::VIA::Pos(), pushOrShoveVia(), pushSpringback(), reduceSpringback(), runOptimizer(), PNS::VIA::SetPos(), PNS::ITEM::SetRank(), SH_HEAD_MODIFIED, SH_INCOMPLETE, SH_OK, shoveMainLoop(), and PNS::VIA_HANDLE::valid.
|
private |
Definition at line 1302 of file pns_shove.cpp.
References PNS::ITEM::ARC_T, assembleLine(), PNS::ALGO_BASE::Dbg(), PNS::LINE::EndsWithVia(), fixupViaCollisions(), PNS::ITEM::Format(), EDA_ITEM::GetItemDescription(), PNS::ITEM::HOLE_T, PNS::ITEM::Kind(), m_currentNode, PNS::COLLISION_SEARCH_OPTIONS::m_kindMask, m_lineStack, PNS::NODE::NearestObstacle(), PNS::ITEM::OfKind(), onCollidingArc(), onCollidingLine(), onCollidingSegment(), onCollidingSolid(), onCollidingVia(), onReverseCollidingVia(), PNS::ITEM::Parent(), pcbIUScale, PNS_DBG, PNS_DBGN, popLineStack(), pushLineStack(), PNS::ITEM::Rank(), PNS::LINE::Rank(), RED, PNS::ITEM::SEGMENT_T, PNS::DEBUG_DECORATOR::SetIteration(), SH_INCOMPLETE, SH_NULL, SH_OK, SH_TRY_WALK, PNS::ITEM::SOLID_T, unwindLineStack(), up, PNS::LINE::Via(), PNS::ITEM::VIA_T, PNS::LINE::Width(), and YELLOW.
Referenced by shoveMainLoop().
|
private |
Definition at line 215 of file pns_shove.cpp.
References PNS::ITEM::Collide(), PNS::LINE::CPoint(), SHAPE_LINE_CHAIN::CPoint(), getClearance(), PNS::VIA::Hull(), PNS::ITEM::Layer(), SHAPE_LINE_CHAIN::Length(), m_currentNode, SHAPE_LINE_CHAIN::PointCount(), PNS::LINE::SetShape(), SH_INCOMPLETE, SH_OK, via, PNS::LINE::Via(), PNS::LINE::Walkaround(), and PNS::LINE::Width().
Referenced by ShoveObstacleLine().
SHOVE::SHOVE_STATUS PNS::SHOVE::ShoveLines | ( | const LINE & | aCurrentHead | ) |
Definition at line 1551 of file pns_shove.cpp.
References PNS::ITEM_SET::Add(), PNS::NODE::Add(), PNS::NODE::Branch(), PNS::NODE::CheckColliding(), PNS::LINK_HOLDER::ClearLinks(), PNS::NODE::ClearRanks(), PNS::Clone(), PNS::LINE::CPoint(), CYAN, PNS::ALGO_BASE::Dbg(), PNS::LINE::EndsWithVia(), PNS::NODE::LockJoint(), m_affectedArea, m_currentNode, m_iter, m_lineStack, m_multiLineMode, m_newHead, m_optimizerQueue, PNS::LINE::Mark(), PNS::MK_HEAD, PNS_DBG, pushLineStack(), pushSpringback(), reduceSpringback(), PNS::NODE::RemoveByMarker(), runOptimizer(), PNS::LINE::SegmentCount(), PNS::VIA::SetPos(), PNS::LINE::SetRank(), SH_HEAD_MODIFIED, SH_INCOMPLETE, SH_OK, shoveMainLoop(), and PNS::LINE::Via().
|
private |
Definition at line 262 of file pns_shove.cpp.
References checkShoveDirection(), PNS::LINE::CLine(), PNS::ITEM::Collide(), PNS::LINE::CPoint(), SHAPE_LINE_CHAIN::CPoint(), PNS::ALGO_BASE::Dbg(), PNS::NODE::FindJoint(), SHAPE_LINE_CHAIN::Format(), LIGHTGRAY, PNS::JOINT::LinkList(), m_currentNode, PNS::LINE::Marker(), PNS::MK_HEAD, path, PNS_DBG, PNS_DBGN, SHAPE_LINE_CHAIN::PointCount(), PNS::LINE::SetShape(), SH_INCOMPLETE, SH_OK, PNS::LINE::Walkaround(), WHITE, PNS::LINE::Width(), and YELLOW.
Referenced by ShoveObstacleLine().
|
private |
Definition at line 1489 of file pns_shove.cpp.
References PNS::ALGO_BASE::Dbg(), PNS::TIME_LIMIT::Expired(), PNS::NODE::JointCount(), m_affectedArea, m_currentNode, m_draggedVia, m_iter, m_lineStack, m_root, PNS_DBG, pushLineStack(), PNS::TIME_LIMIT::Restart(), PNS::ALGO_BASE::Settings(), SH_INCOMPLETE, SH_OK, shoveIteration(), PNS::ROUTING_SETTINGS::ShoveIterationLimit(), and PNS::ROUTING_SETTINGS::ShoveTimeLimit().
Referenced by ShoveDraggingVia(), ShoveLines(), and ShoveMultiLines().
SHOVE::SHOVE_STATUS PNS::SHOVE::ShoveMultiLines | ( | const ITEM_SET & | aHeadSet | ) |
Definition at line 1654 of file pns_shove.cpp.
References PNS::ITEM_SET::Add(), PNS::NODE::Add(), PNS::NODE::Branch(), PNS::ITEM_SET::CItems(), PNS::LINK_HOLDER::ClearLinks(), PNS::NODE::ClearRanks(), PNS::Clone(), PNS::ALGO_BASE::Dbg(), PNS::LINE::EndsWithVia(), m_affectedArea, m_currentNode, m_iter, m_lineStack, m_multiLineMode, m_optimizerQueue, PNS::LINE::Mark(), PNS::MK_HEAD, PNS_DBG, pushLineStack(), pushSpringback(), reduceSpringback(), PNS::NODE::RemoveByMarker(), runOptimizer(), PNS::LINE::SegmentCount(), PNS::LINE::SetRank(), SH_INCOMPLETE, SH_OK, shoveMainLoop(), and PNS::LINE::Via().
SHOVE::SHOVE_STATUS PNS::SHOVE::ShoveObstacleLine | ( | const LINE & | aCurLine, |
const LINE & | aObstacleLine, | ||
LINE & | aResultLine | ||
) |
Definition at line 394 of file pns_shove.cpp.
References PNS::LINK_HOLDER::ClearLinks(), PNS::LINE::CLine(), PNS::LINE::CSegment(), PNS::ALGO_BASE::Dbg(), SHAPE_ARC::DefaultAccuracyForPCB(), PNS::LINE::EndsWithVia(), getClearance(), PNS::ROUTER::GetInterface(), PNS::ROUTER_IFACE::GetNetCode(), PNS::SEGMENT::Hull(), PNS::VIA::Hull(), SHAPE_LINE_CHAIN::IsArcSegment(), KiROUND(), PNS::ITEM::Layer(), PNS::ITEM::LayersOverlap(), PNS::LINK_HOLDER::Links(), PNS::ALGO_BASE::m_router, PNS::LINE::Mark(), PNS::LINE::Marker(), PNS::MK_HEAD, PNS::ITEM::Net(), PNS_DBG, PNS::LINE::SegmentCount(), shoveLineFromLoneVia(), shoveLineToHullSet(), via, PNS::LINE::Via(), and PNS::LINE::Width().
Referenced by PNS::DIFF_PAIR_PLACER::attemptWalk(), onCollidingArc(), onCollidingLine(), onCollidingSegment(), onCollidingSolid(), and onReverseCollidingVia().
|
private |
Definition at line 1535 of file pns_shove.cpp.
References m_affectedArea, and m_nodeStack.
Referenced by runOptimizer().
void PNS::SHOVE::UnlockSpringbackNode | ( | NODE * | aNode | ) |
Definition at line 2017 of file pns_shove.cpp.
References m_nodeStack.
|
private |
Definition at line 1154 of file pns_shove.cpp.
References PNS::ITEM::ARC_T, PNS::ITEM::LINE_T, PNS::LINK_HOLDER::Links(), PNS::ITEM::OfKind(), PNS::ITEM::SEGMENT_T, and unwindLineStack().
|
private |
Definition at line 1125 of file pns_shove.cpp.
References PNS::ALGO_BASE::Dbg(), m_lineStack, m_optimizerQueue, and PNS_DBG.
Referenced by onReverseCollidingVia(), pushOrShoveVia(), shoveIteration(), and unwindLineStack().
|
inherited |
Definition at line 40 of file pns_algo_base.cpp.
References PNS::ALGO_BASE::m_router, and PNS::ROUTER::VisibleViewArea().
Referenced by PNS::DRAGGER::optimizeAndUpdateDraggedLine(), and runOptimizer().
|
private |
Definition at line 153 of file pns_shove.h.
Referenced by replaceItems(), replaceLine(), ShoveDraggingVia(), ShoveLines(), shoveMainLoop(), ShoveMultiLines(), and totalAffectedArea().
|
private |
Definition at line 168 of file pns_shove.h.
Referenced by assembleLine(), fixupViaCollisions(), getClearance(), onCollidingSolid(), onReverseCollidingVia(), pushOrShoveVia(), replaceItems(), replaceLine(), SHOVE(), ShoveDraggingVia(), shoveIteration(), shoveLineFromLoneVia(), ShoveLines(), shoveLineToHullSet(), shoveMainLoop(), and ShoveMultiLines().
|
protectedinherited |
Definition at line 86 of file pns_algo_base.h.
Referenced by PNS::ALGO_BASE::Dbg(), and PNS::ALGO_BASE::SetDebugDecorator().
|
private |
Definition at line 174 of file pns_shove.h.
Referenced by pushOrShoveVia(), SHOVE(), ShoveDraggingVia(), and shoveMainLoop().
|
private |
Definition at line 177 of file pns_shove.h.
Referenced by ForceClearance(), getClearance(), and SHOVE().
|
private |
Definition at line 176 of file pns_shove.h.
Referenced by onReverseCollidingVia(), SHOVE(), ShoveLines(), shoveMainLoop(), and ShoveMultiLines().
|
private |
Definition at line 163 of file pns_shove.h.
Referenced by onCollidingSolid(), popLineStack(), pushLineStack(), ShoveDraggingVia(), shoveIteration(), ShoveLines(), shoveMainLoop(), ShoveMultiLines(), and unwindLineStack().
|
protectedinherited |
Definition at line 88 of file pns_algo_base.h.
Referenced by PNS::ALGO_BASE::Logger(), and PNS::ALGO_BASE::SetLogger().
|
private |
Definition at line 178 of file pns_shove.h.
Referenced by onCollidingArc(), onCollidingLine(), onCollidingSegment(), onCollidingSolid(), pushOrShoveVia(), SHOVE(), ShoveLines(), and ShoveMultiLines().
|
private |
Definition at line 172 of file pns_shove.h.
Referenced by NewHead(), onCollidingArc(), onCollidingLine(), onCollidingSegment(), onCollidingSolid(), pushOrShoveVia(), ShoveDraggingVia(), and ShoveLines().
|
private |
Definition at line 162 of file pns_shove.h.
Referenced by AddLockedSpringbackNode(), CurrentNode(), pushSpringback(), reduceSpringback(), RewindSpringbackTo(), RewindToLastLockedNode(), totalAffectedArea(), and UnlockSpringbackNode().
|
private |
Definition at line 180 of file pns_shove.h.
Referenced by DisablePostShoveOptimizations(), runOptimizer(), and SHOVE().
|
private |
Definition at line 164 of file pns_shove.h.
Referenced by popLineStack(), pushLineStack(), runOptimizer(), ShoveDraggingVia(), ShoveLines(), ShoveMultiLines(), and unwindLineStack().
|
private |
Definition at line 170 of file pns_shove.h.
Referenced by SHOVE().
|
private |
Definition at line 167 of file pns_shove.h.
Referenced by CurrentNode(), reduceSpringback(), SetInitialLine(), SHOVE(), and shoveMainLoop().
|
private |
Definition at line 165 of file pns_shove.h.
Referenced by findRootLine(), replaceLine(), and ~SHOVE().
|
protectedinherited |
Definition at line 87 of file pns_algo_base.h.
Referenced by PNS::MEANDER_PLACER::doMove(), PNS::LINE_PLACER::FixRoute(), PNS::MEANDER_PLACER_BASE::lineLength(), PNS::DP_MEANDER_PLACER::Move(), PNS::MEANDER_SKEW_PLACER::Move(), PNS::ALGO_BASE::Router(), PNS::ALGO_BASE::Settings(), ShoveObstacleLine(), PNS::DIFF_PAIR_PLACER::updateLeadingRatLine(), PNS::LINE_PLACER::updateLeadingRatLine(), and PNS::ALGO_BASE::VisibleViewArea().
|
private |
Definition at line 169 of file pns_shove.h.
Referenced by reduceSpringback(), SetSpringbackDoNotTouchNode(), and SHOVE().