|
KiCad PCB EDA Suite
|
A set of gateways calculated for the cursor or starting/ending primitive pair. More...
#include <pns_diff_pair.h>
Classes | |
| struct | DP_CANDIDATE |
| struct | FIT_RESULT |
Public Member Functions | |
| DP_GATEWAYS (const DP_DIMENSIONS &aDims=DP_DIMENSIONS()) | |
| void | Clear () |
| void | SetFitVias (bool aEnable) |
| bool | FittingVias () const |
| void | BuildForCursor (const VECTOR2I &aCursorPos, int aDirectionMask=-1) |
| void | BuildOrthoProjections (DP_GATEWAYS &aEntries, const VECTOR2I &aCursorPos, int aOrthoScore) |
| void | BuildGeneric (const VECTOR2I &p0_p, const VECTOR2I &p0_n, int aColinearityThreshold=0, bool aBuildEntries=false, bool aViaMode=false) |
| void | BuildFromPrimitivePair (const DP_PRIMITIVE_PAIR &aPair, bool aPreferDiagonal) |
| std::vector< FIT_RESULT > | FitGateways (DP_GATEWAYS &aEntry, DP_GATEWAYS &aTarget, bool aFitVias) |
| std::vector< DP_GATEWAY > & | Gateways () |
| const std::vector< DP_GATEWAY > & | CGateways () const |
| void | FilterByOrientation (int aDirectionMask) |
| void | SetDimensions (const DP_DIMENSIONS &aDims) |
Private Member Functions | |
| void | addGateway (DP_GATEWAY &aGw, const wxString &name=wxT(""), bool aAddTurns=false) |
| bool | checkDiagonalAlignment (const VECTOR2I &a, const VECTOR2I &b) const |
| void | buildDpContinuation (const DP_PRIMITIVE_PAIR &aPair, bool aIsDiagonal) |
| void | buildEntries (DP_GATEWAY &aGw, const VECTOR2I &p0_p, const VECTOR2I &p0_n) |
| void | buildFromPads (const DP_PRIMITIVE_PAIR &aPair) |
Private Attributes | |
| DP_DIMENSIONS | m_dims |
| bool | m_fitVias |
| std::vector< DP_GATEWAY > | m_gateways |
A set of gateways calculated for the cursor or starting/ending primitive pair.
Definition at line 299 of file pns_diff_pair.h.
|
inline |
Definition at line 302 of file pns_diff_pair.h.
References m_dims, and m_fitVias.
Referenced by BuildOrthoProjections(), and FitGateways().
|
private |
Definition at line 549 of file pns_diff_pair.cpp.
References addGateway(), PNS::DP_GATEWAY::AddTurns(), PNS::DP_GATEWAY::Dimensions(), PNS::ROUTER::GetInstance(), m_dims, m_gateways, name, PNS::DP_GATEWAY::SetDimensions(), PNS::DP_GATEWAY::SetName(), and PNS::DP_DIMENSIONS::Width().
Referenced by addGateway(), buildDpContinuation(), BuildFromPrimitivePair(), and BuildGeneric().
|
private |
Definition at line 907 of file pns_diff_pair.cpp.
References addGateway(), PNS::DP_PRIMITIVE_PAIR::AnchorN(), PNS::DP_PRIMITIVE_PAIR::AnchorP(), SHAPE_LINE_CHAIN::Append(), BLUE, SEG::Contains(), SHAPE_LINE_CHAIN::CPoint(), PNS::DP_PRIMITIVE_PAIR::Directional(), PNS::DP_PRIMITIVE_PAIR::DirN(), PNS::DP_PRIMITIVE_PAIR::DirP(), DIRECTION_45::Format(), PNS::ROUTER_IFACE::GetDebugDecorator(), PNS::ROUTER::GetInstance(), PNS::ROUTER::GetInterface(), SEG::IntersectLines(), SEG::LineDistance(), m_dims, m_gateways, DIRECTION_45::Opposite(), PNS_DBG, PNS::DP_PRIMITIVE_PAIR::PrimN(), PNS::DP_PRIMITIVE_PAIR::PrimP(), RED, DIRECTION_45::Right(), PNS::SEGMENT::Seg(), PNS::DP_GATEWAY::SetDimensions(), PNS::DP_GATEWAY::SetDirections(), PNS::DP_GATEWAY::SetEntryLines(), PNS::DP_GATEWAY::SetName(), PNS::DP_GATEWAY::SetPrimaryDirection(), PNS::DP_GATEWAY::SetPriority(), and DIRECTION_45::ToVector().
Referenced by BuildFromPrimitivePair().
|
private |
Definition at line 896 of file pns_diff_pair.cpp.
References PNS::DP_GATEWAY::AnchorN(), PNS::DP_GATEWAY::AnchorP(), DIRECTION_45::BuildInitialTrace(), PNS::DP_GATEWAY::HasEntryLines(), PNS::DP_GATEWAY::IsDiagonal(), SHAPE_LINE_CHAIN::Reverse(), and PNS::DP_GATEWAY::SetEntryLines().
Referenced by BuildGeneric().
| void PNS::DP_GATEWAYS::BuildForCursor | ( | const VECTOR2I & | aCursorPos, |
| int | aDirectionMask = -1 ) |
Definition at line 850 of file pns_diff_pair.cpp.
References PNS::DP_GATEWAY::AddPrimaryDirection(), BuildGeneric(), m_dims, m_fitVias, m_gateways, PNS::makeGapVector(), PNS::DP_GATEWAY::SetName(), PNS::DP_GATEWAY::SetPrimaryDirection(), ToStdString(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by BuildOrthoProjections(), and PNS::DIFF_PAIR_PLACER::routeHead().
|
private |
| void PNS::DP_GATEWAYS::BuildFromPrimitivePair | ( | const DP_PRIMITIVE_PAIR & | aPair, |
| bool | aPreferDiagonal ) |
Definition at line 708 of file pns_diff_pair.cpp.
References SEG::A, addGateway(), PNS::DP_PRIMITIVE_PAIR::AnchorN(), PNS::DP_PRIMITIVE_PAIR::AnchorP(), PNS::ITEM::ARC_T, SEG::B, SHAPE::BBox(), buildDpContinuation(), BuildGeneric(), checkDiagonalAlignment(), PNS::DP_PRIMITIVE_PAIR::DP_ASSUME_PRIMS_COLINEAR_FACTOR, BOX2< Vec >::GetHeight(), PNS::DP_PRIMITIVE_PAIR::GetMinDimension(), BOX2< Vec >::GetWidth(), m_dims, m_gateways, PNS::makeGapVector(), PNS::ITEM::OfKind(), PNS::DP_PRIMITIVE_PAIR::PrimN(), PNS::DP_PRIMITIVE_PAIR::PrimP(), PNS::ITEM::SEGMENT_T, SH_CIRCLE, SH_COMPOUND, SH_RECT, SH_SEGMENT, SH_SIMPLE, PNS::ITEM::Shape(), SHAPE_TYPE_asString(), sign(), PNS::ITEM::SOLID_T, ToStdString(), SHAPE_BASE::Type(), and PNS::ITEM::VIA_T.
Referenced by PNS::DIFF_PAIR_PLACER::routeHead().
| void PNS::DP_GATEWAYS::BuildGeneric | ( | const VECTOR2I & | p0_p, |
| const VECTOR2I & | p0_n, | ||
| int | aColinearityThreshold = 0, | ||
| bool | aBuildEntries = false, | ||
| bool | aViaMode = false ) |
Definition at line 975 of file pns_diff_pair.cpp.
References addGateway(), DIRECTION_45::AllDirectionsMask(), DIRECTION_45::ANG_ACUTE, DIRECTION_45::ANG_OBTUSE, DIRECTION_45::ANG_UNDEFINED, PNS::angle(), SEG::ApproxCollinear(), buildEntries(), PNS::DIFF_PAIR::DP_PARALLELITY_THRESHOLD, PNS::DP_GATEWAY::Extend(), SEG::IntersectLines(), DIRECTION_45::IsObtuse(), DIRECTION_45::Left(), m_dims, m_gateways, PNS::makeGapVector(), DIRECTION_45::Mask(), DIRECTION_45::Opposite(), VECTOR2< T >::Perpendicular(), DIRECTION_45::Right(), PNS::DP_GATEWAY::SetDimensions(), PNS::DP_GATEWAY::SetDirections(), PNS::DP_GATEWAY::SetPrimaryDirection(), and ToStdString().
Referenced by BuildForCursor(), and BuildFromPrimitivePair().
| void PNS::DP_GATEWAYS::BuildOrthoProjections | ( | DP_GATEWAYS & | aEntries, |
| const VECTOR2I & | aCursorPos, | ||
| int | aOrthoScore ) |
Definition at line 600 of file pns_diff_pair.cpp.
References BuildForCursor(), DP_GATEWAYS(), Gateways(), SEG::LineProject(), m_dims, m_fitVias, m_gateways, and ToStdString().
|
inline |
Definition at line 343 of file pns_diff_pair.h.
References m_gateways.
|
private |
Definition at line 672 of file pns_diff_pair.cpp.
References std::abs(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by BuildFromPrimitivePair().
|
inline |
Definition at line 309 of file pns_diff_pair.h.
References m_gateways.
| void PNS::DP_GATEWAYS::FilterByOrientation | ( | int | aDirectionMask | ) |
Definition at line 680 of file pns_diff_pair.cpp.
References PNS::DP_GATEWAY::HasPrimaryDirection(), m_gateways, and PNS::DP_GATEWAY::PrimaryDirectionMask().
| std::vector< DP_GATEWAYS::FIT_RESULT > PNS::DP_GATEWAYS::FitGateways | ( | DP_GATEWAYS & | aEntry, |
| DP_GATEWAYS & | aTarget, | ||
| bool | aFitVias ) |
Definition at line 634 of file pns_diff_pair.cpp.
References PNS::DIFF_PAIR::BuildInitial(), PNS::DIFF_PAIR::CN(), PNS::DIFF_PAIR::CP(), DP_GATEWAYS(), Gateways(), PNS::ROUTER_IFACE::GetDebugDecorator(), PNS::ROUTER::GetInstance(), PNS::ROUTER::GetInterface(), m_dims, PNS_DBG, PNS_DBGN, and result.
Referenced by PNS::DIFF_PAIR_PLACER::routeHead().
|
inline |
Definition at line 316 of file pns_diff_pair.h.
References m_fitVias.
|
inline |
Definition at line 341 of file pns_diff_pair.h.
References m_gateways.
Referenced by BuildOrthoProjections(), PNS::drawGateways(), and FitGateways().
|
inline |
Definition at line 347 of file pns_diff_pair.h.
References m_dims, and m_gateways.
Referenced by PNS::DIFF_PAIR_PLACER::routeHead().
|
inline |
Definition at line 311 of file pns_diff_pair.h.
References m_fitVias.
Referenced by PNS::DIFF_PAIR_PLACER::routeHead().
|
private |
Definition at line 371 of file pns_diff_pair.h.
Referenced by addGateway(), buildDpContinuation(), BuildForCursor(), BuildFromPrimitivePair(), BuildGeneric(), BuildOrthoProjections(), DP_GATEWAYS(), FitGateways(), and SetDimensions().
|
private |
Definition at line 372 of file pns_diff_pair.h.
Referenced by BuildForCursor(), BuildOrthoProjections(), DP_GATEWAYS(), FittingVias(), and SetFitVias().
|
private |
Definition at line 373 of file pns_diff_pair.h.
Referenced by addGateway(), buildDpContinuation(), BuildForCursor(), BuildFromPrimitivePair(), BuildGeneric(), BuildOrthoProjections(), CGateways(), Clear(), FilterByOrientation(), Gateways(), and SetDimensions().