|
KiCad PCB EDA Suite
|
Single track placement algorithm. More...
#include <pns_diff_pair_placer.h>
Public Member Functions | |
| DIFF_PAIR_PLACER (ROUTER *aRouter) | |
| ~DIFF_PAIR_PLACER () | |
| bool | FindDpPrimitivePair (NODE *aWorld, const VECTOR2I &aP, ITEM *aItem, DP_PRIMITIVE_PAIR &aPair, wxString *aErrorMsg=nullptr) |
| bool | Start (const VECTOR2I &aP, ITEM *aStartItem) override |
| Start routing a single track at point aP, taking item aStartItem as anchor (unless NULL). | |
| bool | Move (const VECTOR2I &aP, ITEM *aEndItem) override |
| Move the end of the currently routed trace to the point aP, taking aEndItem as anchor (if not NULL). | |
| bool | FixRoute (const VECTOR2I &aP, ITEM *aEndItem, bool aForceFinish) override |
| Commit the currently routed track to the parent node, taking aP as the final end point and aEndItem as the final anchor (if provided). | |
| bool | CommitPlacement () override |
| bool | AbortPlacement () override |
| bool | HasPlacedAnything () const override |
| bool | ToggleVia (bool aEnabled) override |
| Enable/disable a via at the end of currently routed trace. | |
| bool | SetLayer (int aLayer) override |
| Set the current routing layer. | |
| const ITEM_SET | Traces () override |
| Return the complete routed line, as a single-member ITEM_SET. | |
| const VECTOR2I & | CurrentStart () const override |
| Return the current start of the line being placed. | |
| const VECTOR2I & | CurrentEnd () const override |
| Return the current end of the line being placed. | |
| const std::vector< NET_HANDLE > | CurrentNets () const override |
| Return the net of currently routed track. | |
| int | CurrentLayer () const override |
| Return the layer of currently routed track. | |
| NODE * | CurrentNode (bool aLoopsRemoved=false) const override |
| Return the most recent world state. | |
| void | FlipPosture () override |
| Toggle the current posture (straight/diagonal) of the trace head. | |
| void | UpdateSizes (const SIZES_SETTINGS &aSizes) override |
| Perform on-the-fly update of the width, via diameter & drill size from a settings class. | |
| bool | IsPlacingVia () const override |
| Function IsPlacingVia() | |
| void | SetOrthoMode (bool aOrthoMode) override |
| Function SetOrthoMode() | |
| void | GetModifiedNets (std::vector< NET_HANDLE > &aNets) const override |
| Function GetModifiedNets. | |
| const DIFF_PAIR | CurrentTrace () const |
| virtual std::optional< VECTOR2I > | UnfixRoute () |
| 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 Member Functions | |
| virtual bool | removeLoops (NODE *aNode, LINE &aLatest) |
| virtual bool | simplifyNewLine (NODE *aNode, LINKED_ITEM *aLatest) |
| Assemble a line starting from segment or arc aLatest, removes collinear segments and redundant vertices. | |
Protected Attributes | |
| DEBUG_DECORATOR * | m_debugDecorator |
| ROUTER * | m_router |
| LOGGER * | m_logger |
Private Types | |
| enum | State { RT_START = 0 , RT_ROUTE = 1 , RT_FINISH = 2 } |
Private Member Functions | |
| int | viaGap () const |
| int | gap () const |
| bool | route (const VECTOR2I &aP) |
| Re-route the current track to point aP. | |
| void | updateLeadingRatLine () |
| Draw the "leading" ratsnest line, which connects the end of currently routed track and the nearest yet unrouted item. | |
| void | setWorld (NODE *aWorld) |
| Set the board to route. | |
| void | initPlacement () |
| Initialize placement of a new line with given parameters. | |
| void | setInitialDirection (const DIRECTION_45 &aDirection) |
| Set preferred direction of the very first track segment to be laid. | |
| bool | routeHead (const VECTOR2I &aP) |
| bool | tryWalkDp (NODE *aNode, DIFF_PAIR &aPair, bool aSolidsOnly) |
| route step, walk around mode | |
| bool | rhWalkOnly (const VECTOR2I &aP) |
| route step, shove mode | |
| bool | rhShoveOnly (const VECTOR2I &aP) |
| route step, mark obstacles mode | |
| bool | rhMarkObstacles (const VECTOR2I &aP) |
| const VIA | makeVia (const VECTOR2I &aP, NET_HANDLE aNet) |
| bool | attemptWalk (NODE *aNode, DIFF_PAIR *aCurrent, DIFF_PAIR &aWalk, bool aPFirst, bool aWindCw, bool aSolidsOnly) |
| bool | propagateDpHeadForces (const VECTOR2I &aP, VECTOR2I &aNewP) |
| bool | findDpEndingPrimitives (NODE *aWorld, const VECTOR2I &aP, ITEM *aStartItem, DP_PRIMITIVE_PAIR &aPair, wxString *aErrorMsg) |
| bool | findDpMidtraceIntersection (NODE *aWorld, const VECTOR2I &aP, ITEM *aStartItem, DP_PRIMITIVE_PAIR &aPair, wxString *aErrorMsg) |
Private Attributes | |
| State | m_state |
| bool | m_chainedPlacement |
| bool | m_initialDiagonal |
| bool | m_startDiagonal |
| bool | m_fitOk |
| NET_HANDLE | m_netP |
| NET_HANDLE | m_netN |
| DP_PRIMITIVE_PAIR | m_start |
| std::optional< DP_PRIMITIVE_PAIR > | m_prevPair |
| current algorithm iteration | |
| int | m_iteration |
| pointer to world to search colliding items | |
| NODE * | m_world |
| current routing start point (end of tail, beginning of head) | |
| VECTOR2I | m_p_start |
| The shove engine. | |
| std::unique_ptr< SHOVE > | m_shove |
| Current world state. | |
| NODE * | m_currentNode |
| Postprocessed world state (including marked collisions & removed loops) | |
| NODE * | m_lastNode |
| NODE * | m_lastFixNode |
| SIZES_SETTINGS | m_sizes |
| Are we placing a via? | |
| bool | m_placingVia |
| current via diameter | |
| int | m_viaDiameter |
| current via drill | |
| int | m_viaDrill |
| current track width | |
| int | m_currentWidth |
| int | m_currentLayer |
| bool | m_startsOnVia |
| bool | m_orthoMode |
| bool | m_snapOnTarget |
| VECTOR2I | m_currentEnd |
| VECTOR2I | m_currentStart |
| DIFF_PAIR | m_currentTrace |
| std::optional< DP_PRIMITIVE_PAIR > | m_target |
| bool | m_currentTraceOk |
| ITEM * | m_currentEndItem |
| bool | m_idle |
| bool | m_hasFixedAnything |
Static Private Attributes | |
| static constexpr int | DP_DEFAULT_GAP_EPSILON = 1000 |
Single track placement algorithm.
Interactively routes a track and applies shove and walk around algorithms when needed.
Definition at line 52 of file pns_diff_pair_placer.h.
|
private |
| Enumerator | |
|---|---|
| RT_START | |
| RT_ROUTE | |
| RT_FINISH | |
Definition at line 229 of file pns_diff_pair_placer.h.
| PNS::DIFF_PAIR_PLACER::DIFF_PAIR_PLACER | ( | ROUTER * | aRouter | ) |
Definition at line 40 of file pns_diff_pair_placer.cpp.
References m_chainedPlacement, m_currentEndItem, m_currentLayer, m_currentNode, m_currentTraceOk, m_currentWidth, m_fitOk, m_hasFixedAnything, m_idle, m_initialDiagonal, m_iteration, m_lastFixNode, m_lastNode, m_netN, m_netP, m_orthoMode, m_placingVia, m_shove, m_snapOnTarget, m_startDiagonal, m_startsOnVia, m_state, m_viaDiameter, m_viaDrill, m_world, PNS::PLACEMENT_ALGO::PLACEMENT_ALGO(), and RT_START.
| PNS::DIFF_PAIR_PLACER::~DIFF_PAIR_PLACER | ( | ) |
Definition at line 70 of file pns_diff_pair_placer.cpp.
References m_prevPair, and m_target.
|
overridevirtual |
Reimplemented from PNS::PLACEMENT_ALGO.
Definition at line 1321 of file pns_diff_pair_placer.cpp.
References m_lastNode, and m_world.
|
private |
Definition at line 230 of file pns_diff_pair_placer.cpp.
References PNS::ITEM::ANY_T, BLUE, PNS::NODE::CheckColliding(), PNS::LINE::CLine(), PNS::DIFF_PAIR::CN(), PNS::DIFF_PAIR::CP(), PNS::ALGO_BASE::Dbg(), PNS::DIFF_PAIR::Dimensions(), PNS::SHOVE::ForceClearance(), PNS::DP_DIMENSIONS::Gap(), GREEN, PNS::LINE::Line(), PNS::WALKAROUND::RESULT::lines, PNS::COLLISION_SEARCH_OPTIONS::m_filter, PNS::COLLISION_SEARCH_OPTIONS::m_kindMask, PNS::ITEM::Net(), PNS::DIFF_PAIR::NetN(), PNS::DIFF_PAIR::NetP(), PNS::DIFF_PAIR::NLine(), PNS::DIFF_PAIR::PLine(), PNS_DBG, PNS_HULL_MARGIN, PNS::WALKAROUND::Route(), PNS::ALGO_BASE::Router(), PNS::WALKAROUND::SetAllowedPolicies(), PNS::WALKAROUND::SetCollisionFilter(), PNS::ALGO_BASE::SetDebugDecorator(), PNS::WALKAROUND::SetIterationLimit(), PNS::DIFF_PAIR::SetShape(), PNS::WALKAROUND::SetSolidsOnly(), PNS::ALGO_BASE::Settings(), PNS::SHOVE::ShoveObstacleLine(), SHAPE_LINE_CHAIN::Simplify(), PNS::ITEM::SOLID_T, PNS::WALKAROUND::ST_DONE, PNS::WALKAROUND::RESULT::status, and PNS::WALKAROUND::WP_SHORTEST.
Referenced by tryWalkDp().
|
overridevirtual |
Reimplemented from PNS::PLACEMENT_ALGO.
Definition at line 1335 of file pns_diff_pair_placer.cpp.
References PNS::ROUTER::CommitRouting(), m_currentNode, m_lastFixNode, m_lastNode, m_prevPair, m_start, m_target, and PNS::ALGO_BASE::Router().
Referenced by FixRoute().
|
inlineoverridevirtual |
Return the current end of the line being placed.
It may not be equal to the cursor position due to collisions.
Implements PNS::PLACEMENT_ALGO.
Definition at line 118 of file pns_diff_pair_placer.h.
References m_currentEnd.
|
inlineoverridevirtual |
Return the layer of currently routed track.
Implements PNS::PLACEMENT_ALGO.
Definition at line 131 of file pns_diff_pair_placer.h.
References m_currentLayer.
|
overridevirtual |
Return the net of currently routed track.
Implements PNS::PLACEMENT_ALGO.
Definition at line 1374 of file pns_diff_pair_placer.cpp.
|
overridevirtual |
Return the most recent world state.
Implements PNS::PLACEMENT_ALGO.
Definition at line 489 of file pns_diff_pair_placer.cpp.
References m_currentNode, and m_lastNode.
|
inlineoverridevirtual |
Return the current start of the line being placed.
Implements PNS::PLACEMENT_ALGO.
Definition at line 109 of file pns_diff_pair_placer.h.
References m_currentStart.
|
inline |
Definition at line 159 of file pns_diff_pair_placer.h.
References m_currentTrace.
Referenced by PNS::ROUTER::QueryHoverItems().
|
inlineinherited |
Definition at line 78 of file pns_algo_base.h.
References m_debugDecorator.
Referenced by PNS::SHOVE::AddLockedSpringbackNode(), PNS::DIFF_PAIR_PLACER::attemptWalk(), PNS::DRAGGER::bestAnchorForPoint(), PNS::LINE_PLACER::buildInitialLine(), PNS::SHOVE::checkShoveDirection(), PNS::LINE_PLACER::clipAndCheckCollisions(), PNS::MEANDER_PLACER::doMove(), PNS::COMPONENT_DRAGGER::Drag(), PNS::MULTI_DRAGGER::Drag(), PNS::DRAGGER::dragShove(), PNS::DRAGGER::dragWalkaround(), PNS::DIFF_PAIR_PLACER::FindDpPrimitivePair(), PNS::MULTI_DRAGGER::findNewLeaderSegment(), PNS::DIFF_PAIR_PLACER::FixRoute(), PNS::SHOVE::fixupViaCollisions(), PNS::LINE_PLACER::handlePullback(), PNS::DIFF_PAIR_PLACER::initPlacement(), PNS::LINE_PLACER::mergeHead(), PNS::DIFF_PAIR_PLACER::Move(), 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::PLACEMENT_ALGO::removeLoops(), PNS::SHOVE::replaceItems(), PNS::SHOVE::replaceLine(), PNS::LINE_PLACER::rhShoveOnly(), PNS::LINE_PLACER::rhWalkBase(), PNS::LINE_PLACER::rhWalkOnly(), PNS::WALKAROUND::Route(), PNS::DIFF_PAIR_PLACER::routeHead(), PNS::LINE_PLACER::routeStep(), PNS::SHOVE::Run(), PNS::SHOVE::runOptimizer(), PNS::SHOVE::shoveIteration(), PNS::SHOVE::shoveLineToHullSet(), PNS::SHOVE::shoveMainLoop(), PNS::SHOVE::ShoveObstacleLine(), PNS::PLACEMENT_ALGO::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().
|
private |
Definition at line 573 of file pns_diff_pair_placer.cpp.
References _, PNS::NODE::AllItemsInNet(), anchor, PNS::RULE_RESOLVER::DpNetPair(), dyn_cast(), PNS::getDanglingAnchor(), PNS::NODE::GetRuleResolver(), PNS::ITEM::Kind(), PNS::ITEM::Layers(), PNS::ITEM::Net(), PNS::DP_PRIMITIVE_PAIR::SetAnchors(), PNS::DP_PRIMITIVE_PAIR::SetIsMidtrace(), PNS::ITEM::SOLID_T, and PNS::ITEM::VIA_T.
Referenced by FindDpPrimitivePair().
|
private |
Definition at line 658 of file pns_diff_pair_placer.cpp.
References PNS::ITEM::ARC_T, PNS::TOPOLOGY::AssembleDiffPair(), PNS::DIFF_PAIR::BuildMidpairIntersection(), dyn_cast(), PNS::ITEM::OfKind(), and PNS::ITEM::SEGMENT_T.
Referenced by FindDpPrimitivePair().
| bool PNS::DIFF_PAIR_PLACER::FindDpPrimitivePair | ( | NODE * | aWorld, |
| const VECTOR2I & | aP, | ||
| ITEM * | aItem, | ||
| DP_PRIMITIVE_PAIR & | aPair, | ||
| wxString * | aErrorMsg = nullptr ) |
Definition at line 691 of file pns_diff_pair_placer.cpp.
References _, PNS::DP_PRIMITIVE_PAIR::AnchorN(), PNS::DP_PRIMITIVE_PAIR::AnchorP(), PNS::ALGO_BASE::Dbg(), PNS::RULE_RESOLVER::DpNetPair(), findDpEndingPrimitives(), findDpMidtraceIntersection(), PNS::NODE::GetRuleResolver(), PNS_DBG, result, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by PNS::ROUTER::isStartingPointRoutable(), routeHead(), and Start().
|
overridevirtual |
Commit the currently routed track to the parent node, taking aP as the final end point and aEndItem as the final anchor (if provided).
Implements PNS::PLACEMENT_ALGO.
Definition at line 1229 of file pns_diff_pair_placer.cpp.
References PNS::Clone(), CommitPlacement(), PNS::ALGO_BASE::Dbg(), initPlacement(), DIRECTION_45::IsDiagonal(), m_chainedPlacement, m_currentTrace, m_fitOk, m_hasFixedAnything, m_idle, m_initialDiagonal, m_lastFixNode, m_lastNode, m_placingVia, m_prevPair, m_shove, m_snapOnTarget, m_start, m_target, m_world, PNS_DBG, SHAPE_LINE_CHAIN::Remove(), PNS::RM_Shove, PNS::ALGO_BASE::Router(), SHAPE_LINE_CHAIN::SegmentCount(), and PNS::ALGO_BASE::Settings().
|
overridevirtual |
Toggle the current posture (straight/diagonal) of the trace head.
Reimplemented from PNS::PLACEMENT_ALGO.
Definition at line 480 of file pns_diff_pair_placer.cpp.
References m_currentEnd, m_idle, m_startDiagonal, and Move().
|
private |
Definition at line 745 of file pns_diff_pair_placer.cpp.
References m_sizes.
|
overridevirtual |
Function GetModifiedNets.
Returns the nets of all currently routed trace(s)
Reimplemented from PNS::PLACEMENT_ALGO.
Definition at line 1354 of file pns_diff_pair_placer.cpp.
|
overridevirtual |
Reimplemented from PNS::PLACEMENT_ALGO.
Definition at line 1329 of file pns_diff_pair_placer.cpp.
References m_currentTrace.
|
private |
Initialize placement of a new line with given parameters.
Definition at line 785 of file pns_diff_pair_placer.cpp.
References PNS::NODE::Branch(), PNS::ALGO_BASE::Dbg(), PNS::NODE::Depth(), PNS::ROUTER::GetWorld(), PNS::NODE::KillChildren(), m_currentEndItem, m_currentNode, m_idle, m_initialDiagonal, m_lastNode, m_orthoMode, m_shove, m_start, m_startDiagonal, PNS_DBG, PNS::ALGO_BASE::Router(), setWorld(), and PNS::SplitAdjacentSegments().
Referenced by FixRoute(), SetLayer(), and Start().
|
inlineoverridevirtual |
Function IsPlacingVia()
Returns true if the placer is placing a via (or more vias).
Reimplemented from PNS::PLACEMENT_ALGO.
Definition at line 153 of file pns_diff_pair_placer.h.
References m_placingVia.
|
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().
|
private |
Definition at line 85 of file pns_diff_pair_placer.cpp.
References PNS::ROUTER::GetInterface(), PNS::ROUTER_IFACE::GetViaLayerRange(), m_sizes, and PNS::ALGO_BASE::Router().
Referenced by propagateDpHeadForces(), and routeHead().
Move the end of the currently routed trace to the point aP, taking aEndItem as anchor (if not NULL).
Implements PNS::PLACEMENT_ALGO.
Definition at line 1106 of file pns_diff_pair_placer.cpp.
References BLUE, PNS::NODE::Branch(), PNS::ALGO_BASE::Dbg(), m_currentEnd, m_currentEndItem, m_currentNode, m_currentTrace, m_fitOk, m_lastNode, m_start, m_target, PNS_DBG, RED, PNS::PLACEMENT_ALGO::removeLoops(), route(), PNS::ALGO_BASE::Settings(), PNS::SplitAdjacentSegments(), and updateLeadingRatLine().
Referenced by FlipPosture(), SetLayer(), SetOrthoMode(), and ToggleVia().
Definition at line 140 of file pns_diff_pair_placer.cpp.
References PNS::ITEM::ANY_T, clearance, PNS::VIA::Diameter(), m_currentLayer, m_currentNode, m_currentTrace, PNS::COLLISION_SEARCH_OPTIONS::m_filter, PNS::COLLISION_SEARCH_OPTIONS::m_kindMask, m_placingVia, m_sizes, makeVia(), PNS::ITEM::Net(), PNS::VIA::Pos(), PNS::ITEM::RelevantShapeLayers(), PNS::RM_MarkObstacles, PNS::RM_Walkaround, PNS::VIA::SetDiameter(), PNS::ITEM::SetLayer(), PNS::VIA::SetPos(), PNS::ALGO_BASE::Settings(), PNS::VIA::Shape(), PNS::ITEM::SOLID_T, VECTOR2< T >::SquaredEuclideanNorm(), and viaGap().
Referenced by routeHead().
Definition at line 2096 of file pns_line_placer.cpp.
References PNS::NODE::Add(), PNS::NODE::AssembleLine(), SHAPE_LINE_CHAIN::CLastPoint(), PNS::LINK_HOLDER::ClearLinks(), PNS::LINE::CLine(), SHAPE_LINE_CHAIN::CPoint(), PNS::ALGO_BASE::Dbg(), PNS::NODE::FindLineEnds(), PNS::NODE::FindLinesBetweenJoints(), PNS::LINK_HOLDER::GetLink(), PNS::LINK_HOLDER::LinkCount(), PNS_DBG, PNS::NODE::Remove(), and PNS::LINE::SegmentCount().
Referenced by PNS::DIFF_PAIR_PLACER::Move(), and PNS::LINE_PLACER::Move().
|
private |
Definition at line 115 of file pns_diff_pair_placer.cpp.
References m_currentNode, m_currentTrace, PNS::COLLISION_SEARCH_OPTIONS::m_filter, m_fitOk, PNS::ITEM::Net(), and routeHead().
Referenced by route().
|
private |
route step, mark obstacles mode
Definition at line 402 of file pns_diff_pair_placer.cpp.
References PNS::LINE::CLine(), m_currentNode, m_currentTrace, m_fitOk, m_shove, PNS::ITEM::Net(), routeHead(), PNS::SHOVE::SH_OK, and tryWalkDp().
Referenced by route().
|
private |
route step, shove mode
Definition at line 373 of file pns_diff_pair_placer.cpp.
References m_currentNode, m_currentTrace, m_fitOk, routeHead(), and tryWalkDp().
Referenced by route().
|
private |
Re-route the current track to point aP.
Returns true, when routing has completed successfully (i.e. the trace end has reached point aP), and false if the trace was stuck somewhere on the way. May call routeStep() repetitively due to mouse smoothing.
| aP | is the ending point of current route. |
Definition at line 384 of file pns_diff_pair_placer.cpp.
References rhMarkObstacles(), rhShoveOnly(), rhWalkOnly(), PNS::RM_MarkObstacles, PNS::RM_Shove, PNS::RM_Walkaround, and PNS::ALGO_BASE::Settings().
Referenced by Move().
|
private |
Definition at line 841 of file pns_diff_pair_placer.cpp.
References PNS::DP_PRIMITIVE_PAIR::AnchorN(), PNS::DP_PRIMITIVE_PAIR::AnchorP(), DIRECTION_45::ANG_OBTUSE, DIRECTION_45::ANG_STRAIGHT, DIRECTION_45::Angle(), PNS::DP_GATEWAYS::FIT_RESULT::aspectRatio, BLUE, PNS::DP_GATEWAYS::BuildForCursor(), PNS::DP_GATEWAYS::BuildFromPrimitivePair(), PNS::RULE_RESOLVER::Clearance(), clearance, PNS::DP_GATEWAYS::FIT_RESULT::coupledRatio, PNS::ALGO_BASE::Dbg(), PNS::DP_GATEWAYS::FIT_RESULT::diagonal, PNS::DIFF_PAIR::DirN(), PNS::DP_PRIMITIVE_PAIR::DirN(), PNS::DIFF_PAIR::DirP(), PNS::DP_PRIMITIVE_PAIR::DirP(), DP_DEFAULT_GAP_EPSILON, PNS::drawGateways(), PNS::drawSingleGateway(), PNS::DP_GATEWAYS::FIT_RESULT::entry, FindDpPrimitivePair(), PNS::DP_GATEWAYS::FitGateways(), DIRECTION_45::Format(), PNS::Format(), PNS::DP_DIMENSIONS::Gap(), PNS::ROUTER::GetInterface(), PNS::DP_GATEWAY::GetName(), PNS::ROUTER_IFACE::GetRuleResolver(), index, SEG::LineProject(), m_currentEndItem, m_currentLayer, m_currentNode, m_currentTrace, m_currentTraceOk, m_fitOk, m_netN, m_netP, m_placingVia, m_prevPair, m_sizes, m_snapOnTarget, m_start, m_startDiagonal, m_target, makeVia(), DIRECTION_45::Mask(), PNS::DP_GATEWAYS::FIT_RESULT::n, DIRECTION_45::Opposite(), PNS::DP_GATEWAYS::FIT_RESULT::p, VECTOR2< T >::Perpendicular(), PNS_DBG, PNS_DBGN, propagateDpHeadForces(), RED, PNS::ALGO_BASE::Router(), PNS::DP_GATEWAYS::FIT_RESULT::score, PNS::DIFF_PAIR::SetDimensions(), PNS::DP_GATEWAYS::SetDimensions(), PNS::DP_GATEWAYS::SetFitVias(), PNS::DP_DIMENSIONS::SetGapConstraint(), MINOPTMAX< T >::SetMax(), MINOPTMAX< T >::SetMin(), PNS::DP_DIMENSIONS::SetMinClearance(), MINOPTMAX< T >::SetOpt(), PNS::DIFF_PAIR::SetShape(), PNS::DP_GATEWAYS::FIT_RESULT::target, viaGap(), VECTOR2< T >::x, VECTOR2< T >::y, and YELLOW.
Referenced by rhMarkObstacles(), rhShoveOnly(), and rhWalkOnly().
|
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::chainNarrowingOffset(), 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::MEANDER_PLACER_BASE::initChainExtras(), PNS::DIFF_PAIR_PLACER::initPlacement(), PNS::LINE_PLACER::initPlacement(), PNS::MEANDER_PLACER_BASE::lineDelay(), PNS::MEANDER_PLACER_BASE::lineLength(), PNS::DIFF_PAIR_PLACER::makeVia(), PNS::LINE_PLACER::makeVia(), PNS::MULTI_DRAGGER::multidragShove(), PNS::SHOVE::onCollidingSolid(), PNS::SHOVE::reconstructHeads(), PNS::LINE_PLACER::rhWalkBase(), PNS::DIFF_PAIR_PLACER::routeHead(), PNS::SHOVE::Run(), 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::startDragArc(), 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::DIFF_PAIR_PLACER::attemptWalk(), PNS::SHOVE::onCollidingSolid(), PNS::LINE_PLACER::rhWalkBase(), PNS::SHOVE::SHOVE(), PNS::DRAGGER::tryWalkaround(), and PNS::MULTI_DRAGGER::tryWalkaround().
|
private |
Set preferred direction of the very first track segment to be laid.
Used by posture switching mechanism.
|
overridevirtual |
Set the current routing layer.
Reimplemented from PNS::PLACEMENT_ALGO.
Definition at line 498 of file pns_diff_pair_placer.cpp.
References initPlacement(), m_chainedPlacement, m_currentEnd, m_currentLayer, m_idle, m_prevPair, m_start, Move(), and PNS::ITEM::VIA_T.
|
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().
|
overridevirtual |
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 from PNS::PLACEMENT_ALGO.
Definition at line 95 of file pns_diff_pair_placer.cpp.
References m_currentEnd, m_idle, m_orthoMode, and Move().
|
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::DIFF_PAIR_PLACER::Move(), 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().
|
private |
Set the board to route.
Definition at line 79 of file pns_diff_pair_placer.cpp.
References m_world.
Referenced by initPlacement(), and Start().
|
protectedvirtualinherited |
Assemble a line starting from segment or arc aLatest, removes collinear segments and redundant vertices.
If a simplification has been found, replaces the old line with the simplified one in aNode.
Definition at line 1773 of file pns_line_placer.cpp.
References PNS::NODE::Add(), PNS::ITEM::ARC_T, PNS::NODE::AssembleLine(), PNS::ITEM_SET::CItems(), PNS::LINE::CLine(), PNS::JOINT::CLinks(), SEG::Contains(), PNS::ALGO_BASE::Dbg(), PNS::NODE::FindJoint(), PNS::NODE::GetUpdatedItems(), PNS::JOINT::IsLineCorner(), PNS::JOINT::LinkCount(), PNS::OPTIMIZER::MERGE_COLINEAR, PNS::ITEM::OfKind(), PNS::OPTIMIZER::Optimize(), PNS_DBG, PNS::LINE::PointCount(), SHAPE_LINE_CHAIN::PointCount(), RED, PNS::NODE::Remove(), PNS::ITEM::SEGMENT_T, PNS::LINE::SetShape(), and SHAPE_LINE_CHAIN::Simplify().
Referenced by PNS::LINE_PLACER::FixRoute().
Start routing a single track at point aP, taking item aStartItem as anchor (unless NULL).
Implements PNS::PLACEMENT_ALGO.
Definition at line 751 of file pns_diff_pair_placer.cpp.
References DIFF_PAIR, FindDpPrimitivePair(), initPlacement(), m_chainedPlacement, m_currentEnd, m_currentNode, m_currentStart, m_currentTrace, m_currentTraceOk, m_hasFixedAnything, m_lastFixNode, m_netN, m_netP, m_placingVia, m_start, m_world, PNS::ALGO_BASE::Router(), PNS::ROUTER::SetFailureReason(), and setWorld().
|
overridevirtual |
Enable/disable a via at the end of currently routed trace.
Reimplemented from PNS::PLACEMENT_ALGO.
Definition at line 104 of file pns_diff_pair_placer.cpp.
References m_currentEnd, m_idle, m_placingVia, and Move().
|
overridevirtual |
Return the complete routed line, as a single-member ITEM_SET.
Implements PNS::PLACEMENT_ALGO.
Definition at line 469 of file pns_diff_pair_placer.cpp.
References PNS::ITEM_SET::Add(), and m_currentTrace.
route step, walk around mode
Definition at line 329 of file pns_diff_pair_placer.cpp.
References attemptWalk(), PNS::DIFF_PAIR::CoupledLength(), m_currentNode, PNS::OPTIMIZER::Optimize(), PNS::DIFF_PAIR::SetShape(), and PNS::DIFF_PAIR::Skew().
Referenced by rhShoveOnly(), and rhWalkOnly().
|
inlinevirtualinherited |
Reimplemented in PNS::LINE_PLACER.
Definition at line 81 of file pns_placement_algo.h.
|
private |
Draw the "leading" ratsnest line, which connects the end of currently routed track and the nearest yet unrouted item.
If the routing for current net is complete, draws nothing.
Definition at line 1361 of file pns_diff_pair_placer.cpp.
References PNS::TOPOLOGY::LeadingRatLine(), m_currentTrace, m_lastNode, m_netN, m_netP, and PNS::ALGO_BASE::m_router.
Referenced by Move().
|
overridevirtual |
Perform 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 from PNS::PLACEMENT_ALGO.
Definition at line 1203 of file pns_diff_pair_placer.cpp.
References m_currentTrace, m_hasFixedAnything, m_idle, m_sizes, and viaGap().
|
private |
Definition at line 739 of file pns_diff_pair_placer.cpp.
References m_sizes.
Referenced by propagateDpHeadForces(), routeHead(), and UpdateSizes().
|
inherited |
Definition at line 40 of file pns_algo_base.cpp.
References m_router.
Referenced by PNS::SHOVE::runOptimizer().
|
staticconstexprprivate |
Definition at line 163 of file pns_diff_pair_placer.h.
Referenced by routeHead().
|
private |
Definition at line 237 of file pns_diff_pair_placer.h.
Referenced by DIFF_PAIR_PLACER(), FixRoute(), SetLayer(), and Start().
|
private |
Definition at line 286 of file pns_diff_pair_placer.h.
Referenced by CurrentEnd(), FlipPosture(), Move(), SetLayer(), SetOrthoMode(), Start(), and ToggleVia().
|
private |
Definition at line 291 of file pns_diff_pair_placer.h.
Referenced by DIFF_PAIR_PLACER(), initPlacement(), Move(), and routeHead().
|
private |
Definition at line 280 of file pns_diff_pair_placer.h.
Referenced by CurrentLayer(), DIFF_PAIR_PLACER(), propagateDpHeadForces(), routeHead(), and SetLayer().
|
private |
Postprocessed world state (including marked collisions & removed loops)
Definition at line 260 of file pns_diff_pair_placer.h.
Referenced by CommitPlacement(), CurrentNode(), DIFF_PAIR_PLACER(), initPlacement(), Move(), propagateDpHeadForces(), rhMarkObstacles(), rhShoveOnly(), rhWalkOnly(), routeHead(), Start(), and tryWalkDp().
|
private |
Definition at line 286 of file pns_diff_pair_placer.h.
Referenced by CurrentStart(), and Start().
|
private |
Definition at line 287 of file pns_diff_pair_placer.h.
Referenced by CurrentTrace(), FixRoute(), HasPlacedAnything(), Move(), propagateDpHeadForces(), rhMarkObstacles(), rhShoveOnly(), rhWalkOnly(), routeHead(), Start(), Traces(), updateLeadingRatLine(), and UpdateSizes().
|
private |
Definition at line 289 of file pns_diff_pair_placer.h.
Referenced by DIFF_PAIR_PLACER(), routeHead(), and Start().
|
private |
Definition at line 278 of file pns_diff_pair_placer.h.
Referenced by DIFF_PAIR_PLACER().
|
protectedinherited |
Definition at line 86 of file pns_algo_base.h.
Referenced by ALGO_BASE(), Dbg(), and SetDebugDecorator().
|
private |
Definition at line 240 of file pns_diff_pair_placer.h.
Referenced by DIFF_PAIR_PLACER(), FixRoute(), Move(), rhMarkObstacles(), rhShoveOnly(), rhWalkOnly(), and routeHead().
|
private |
Definition at line 294 of file pns_diff_pair_placer.h.
Referenced by DIFF_PAIR_PLACER(), FixRoute(), Start(), and UpdateSizes().
|
private |
Definition at line 293 of file pns_diff_pair_placer.h.
Referenced by DIFF_PAIR_PLACER(), FixRoute(), FlipPosture(), initPlacement(), SetLayer(), SetOrthoMode(), ToggleVia(), and UpdateSizes().
|
private |
Definition at line 238 of file pns_diff_pair_placer.h.
Referenced by DIFF_PAIR_PLACER(), FixRoute(), and initPlacement().
|
private |
pointer to world to search colliding items
Definition at line 248 of file pns_diff_pair_placer.h.
Referenced by DIFF_PAIR_PLACER().
|
private |
Definition at line 264 of file pns_diff_pair_placer.h.
Referenced by CommitPlacement(), DIFF_PAIR_PLACER(), FixRoute(), and Start().
|
private |
Definition at line 263 of file pns_diff_pair_placer.h.
Referenced by AbortPlacement(), CommitPlacement(), CurrentNode(), DIFF_PAIR_PLACER(), FixRoute(), initPlacement(), Move(), and updateLeadingRatLine().
|
protectedinherited |
Definition at line 88 of file pns_algo_base.h.
Referenced by ALGO_BASE(), Logger(), and SetLogger().
|
private |
Definition at line 242 of file pns_diff_pair_placer.h.
Referenced by CurrentNets(), DIFF_PAIR_PLACER(), GetModifiedNets(), routeHead(), Start(), and updateLeadingRatLine().
|
private |
Definition at line 242 of file pns_diff_pair_placer.h.
Referenced by CurrentNets(), DIFF_PAIR_PLACER(), GetModifiedNets(), routeHead(), Start(), and updateLeadingRatLine().
|
private |
Definition at line 283 of file pns_diff_pair_placer.h.
Referenced by DIFF_PAIR_PLACER(), initPlacement(), and SetOrthoMode().
|
private |
The shove engine.
Definition at line 254 of file pns_diff_pair_placer.h.
|
private |
current via diameter
Definition at line 269 of file pns_diff_pair_placer.h.
Referenced by DIFF_PAIR_PLACER(), FixRoute(), IsPlacingVia(), propagateDpHeadForces(), routeHead(), Start(), and ToggleVia().
|
private |
current algorithm iteration
Definition at line 245 of file pns_diff_pair_placer.h.
Referenced by CommitPlacement(), FixRoute(), routeHead(), SetLayer(), and ~DIFF_PAIR_PLACER().
|
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().
|
private |
Current world state.
Definition at line 257 of file pns_diff_pair_placer.h.
Referenced by DIFF_PAIR_PLACER(), FixRoute(), initPlacement(), and rhShoveOnly().
|
private |
Are we placing a via?
Definition at line 266 of file pns_diff_pair_placer.h.
Referenced by gap(), makeVia(), propagateDpHeadForces(), routeHead(), UpdateSizes(), and viaGap().
|
private |
Definition at line 284 of file pns_diff_pair_placer.h.
Referenced by DIFF_PAIR_PLACER(), FixRoute(), and routeHead().
|
private |
Definition at line 244 of file pns_diff_pair_placer.h.
Referenced by CommitPlacement(), FixRoute(), initPlacement(), Move(), routeHead(), SetLayer(), and Start().
|
private |
Definition at line 239 of file pns_diff_pair_placer.h.
Referenced by DIFF_PAIR_PLACER(), FlipPosture(), initPlacement(), and routeHead().
|
private |
Definition at line 282 of file pns_diff_pair_placer.h.
Referenced by DIFF_PAIR_PLACER().
|
private |
Definition at line 235 of file pns_diff_pair_placer.h.
Referenced by DIFF_PAIR_PLACER().
|
private |
Definition at line 288 of file pns_diff_pair_placer.h.
Referenced by CommitPlacement(), FixRoute(), Move(), routeHead(), and ~DIFF_PAIR_PLACER().
|
private |
current via drill
Definition at line 272 of file pns_diff_pair_placer.h.
Referenced by DIFF_PAIR_PLACER().
|
private |
current track width
Definition at line 275 of file pns_diff_pair_placer.h.
Referenced by DIFF_PAIR_PLACER().
|
private |
current routing start point (end of tail, beginning of head)
Definition at line 251 of file pns_diff_pair_placer.h.
Referenced by AbortPlacement(), DIFF_PAIR_PLACER(), FixRoute(), setWorld(), and Start().