KiCad PCB EDA Suite
Loading...
Searching...
No Matches
PNS::TOPOLOGY Class Reference

#include <pns_topology.h>

Classes

struct  CLUSTER
 
struct  PATH_RESULT
 
struct  WALK_RESULT
 

Public Types

typedef std::set< const JOINT * > JOINT_SET
 

Public Member Functions

 TOPOLOGY (NODE *aNode, ROUTER_IFACE *aIface=nullptr)
 
 ~TOPOLOGY ()
 
bool SimplifyLine (LINE *aLine)
 
ITEM * NearestUnconnectedItem (const JOINT *aStart, int *aAnchor=nullptr, int aKindMask=ITEM::ANY_T)
 
bool NearestUnconnectedAnchorPoint (const LINE *aTrack, VECTOR2I &aPoint, PNS_LAYER_RANGE &aLayers, ITEM *&aItem)
 
bool LeadingRatLine (const LINE *aTrack, SHAPE_LINE_CHAIN &aRatLine)
 
const JOINT_SET ConnectedJoints (const JOINT *aStart)
 
const ITEM_SET ConnectedItems (const JOINT *aStart, int aKindMask=ITEM::ANY_T)
 
const ITEM_SET ConnectedItems (ITEM *aStart, int aKindMask=ITEM::ANY_T)
 
int64_t ShortestConnectionLength (ITEM *aFrom, ITEM *aTo)
 
const ITEM_SET AssembleTrivialPath (ITEM *aStart, std::pair< const JOINT *, const JOINT * > *aTerminalJoints=nullptr, bool aFollowLockedSegments=false)
 Assemble a trivial path between two joints given a starting item.
 
const ITEM_SET AssembleTuningPath (ROUTER_IFACE *aRouterIface, ITEM *aStart, SOLID **aStartPad=nullptr, SOLID **aEndPad=nullptr)
 Like AssembleTrivialPath, but follows the track length algorithm, which discards segments that are fully inside pads, and truncates segments that cross into a pad (adding a straight- line segment from the intersection to the pad anchor).
 
const DIFF_PAIR AssembleDiffPair (SEGMENT *aStart)
 
bool AssembleDiffPair (ITEM *aStart, DIFF_PAIR &aPair)
 
const CLUSTER AssembleCluster (ITEM *aStart, int aLayer, double aAreaExpansionLimit=0.0, NET_HANDLE aExcludedNet=nullptr, int aOverrideClearance=0)
 

Private Member Functions

std::vector< LINE > findLinesFromVia (ROUTER_IFACE *aRouterIface, VIA *aVia, const std::set< ITEM * > &aVisited)
 
WALK_RESULT walkTuningPath (ROUTER_IFACE *aRouterIface, LINE &aStartLine, bool aStartFromBack, const std::set< ITEM * > &aVisited)
 
PATH_RESULT followBranch (const JOINT *aStartJoint, LINKED_ITEM *aPrev, std::set< ITEM * > &aVisited, bool aFollowLockedSegments)
 
ITEM_SET followTrivialPath (LINE *aLine, const JOINT **aTerminalJointA, const JOINT **aTerminalJointB, bool aFollowLockedSegments=false)
 

Private Attributes

NODE * m_world
 
ROUTER_IFACE * m_iface
 

Detailed Description

Definition at line 42 of file pns_topology.h.

Member Typedef Documentation

◆ JOINT_SET

typedef std::set<const JOINT*> PNS::TOPOLOGY::JOINT_SET

Definition at line 52 of file pns_topology.h.

Constructor & Destructor Documentation

◆ TOPOLOGY()

PNS::TOPOLOGY::TOPOLOGY ( NODE * aNode,
ROUTER_IFACE * aIface = nullptr )
inline
Parameters
aNode
aIfaceif given, lets board connections the router does not model, such as zones, count when searching for unconnected items.

Definition at line 59 of file pns_topology.h.

References m_iface, and m_world.

Referenced by NearestUnconnectedAnchorPoint().

◆ ~TOPOLOGY()

PNS::TOPOLOGY::~TOPOLOGY ( )
inline

Definition at line 64 of file pns_topology.h.

Member Function Documentation

◆ AssembleCluster()

◆ AssembleDiffPair() [1/2]

◆ AssembleDiffPair() [2/2]

◆ AssembleTrivialPath()

const ITEM_SET PNS::TOPOLOGY::AssembleTrivialPath ( ITEM * aStart,
std::pair< const JOINT *, const JOINT * > * aTerminalJoints = nullptr,
bool aFollowLockedSegments = false )

Assemble a trivial path between two joints given a starting item.

Parameters
aStartis the item to assemble from.
aTerminalJointswill be filled with the start and end points of the assembled path.
aFollowLockedSegmentsif true will assemble a path including locked segments
Returns
a set of items in the path.

Definition at line 468 of file pns_topology.cpp.

References PNS::ITEM::ARC_T, PNS::LINE::CLine(), PNS::JOINT::CLinks(), followTrivialPath(), PNS::JOINT::IsNonFanoutVia(), PNS::ITEM::Kind(), PNS::ITEM::KindStr(), SHAPE_LINE_CHAIN::Length(), m_world, PNS::ITEM::OfKind(), path, PNS::JOINT::Pos(), PNS::ITEM::SEGMENT_T, PNS::LINE::SegmentCount(), via, PNS::ITEM::VIA_T, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by PNS::MEANDER_SKEW_PLACER::Start().

◆ AssembleTuningPath()

const ITEM_SET PNS::TOPOLOGY::AssembleTuningPath ( ROUTER_IFACE * aRouterIface,
ITEM * aStart,
SOLID ** aStartPad = nullptr,
SOLID ** aEndPad = nullptr )

Like AssembleTrivialPath, but follows the track length algorithm, which discards segments that are fully inside pads, and truncates segments that cross into a pad (adding a straight- line segment from the intersection to the pad anchor).

Note
When changing this, sync with BOARD::GetTrackLength()
Parameters
aRouterIfaceis the router interface.
aStartis the item to assemble a path from.
aStartPadwill be filled with the starting pad of the path, if found.
aEndPadwill be filled with the ending pad of the path, if found.
Returns
an item set containing all the items in the path.

Definition at line 794 of file pns_topology.cpp.

References PNS::ITEM::ARC_T, PNS::LINE::CLastPoint(), PNS::LINE::CLine(), PNS::JOINT::CLinks(), PNS::LINE::CPoint(), delta, findLinesFromVia(), PNS::ROUTER_IFACE::GetBoardLayerFromPNSLayer(), PNS::JOINT::IsNonFanoutVia(), PNS::ITEM::Kind(), PNS::ITEM::KindStr(), PNS::ITEM::Layer(), left, SHAPE_LINE_CHAIN::Length(), PNS::LINE::Line(), PNS::ITEM::LINE_T, PNS::LINK_HOLDER::Links(), m_world, PNS::ITEM::Net(), PNS::ITEM::OfKind(), LENGTH_DELAY_CALCULATION::OptimiseTraceInPad(), LENGTH_DELAY_CALCULATION::OptimiseTraceInVia(), PNS::ITEM::Parent(), path, PCB_PAD_T, PCB_VIA_T, right, PNS::ITEM::SEGMENT_T, PNS::LINE::SegmentCount(), PNS::ITEM::SOLID_T, EDA_ITEM::Type(), via, PNS::ITEM::VIA_T, walkTuningPath(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by BOOST_FIXTURE_TEST_CASE(), DIFF_PHASE_SKEW_TOOL::getNetPaths(), PNS::DP_MEANDER_PLACER::Start(), PNS::MEANDER_PLACER::Start(), and PNS::MEANDER_SKEW_PLACER::Start().

◆ ConnectedItems() [1/2]

const ITEM_SET PNS::TOPOLOGY::ConnectedItems ( const JOINT * aStart,
int aKindMask = ITEM::ANY_T )

Definition at line 1028 of file pns_topology.cpp.

◆ ConnectedItems() [2/2]

const ITEM_SET PNS::TOPOLOGY::ConnectedItems ( ITEM * aStart,
int aKindMask = ITEM::ANY_T )

Definition at line 1034 of file pns_topology.cpp.

◆ ConnectedJoints()

const TOPOLOGY::JOINT_SET PNS::TOPOLOGY::ConnectedJoints ( const JOINT * aStart)

◆ findLinesFromVia()

◆ followBranch()

◆ followTrivialPath()

ITEM_SET PNS::TOPOLOGY::followTrivialPath ( LINE * aLine,
const JOINT ** aTerminalJointA,
const JOINT ** aTerminalJointB,
bool aFollowLockedSegments = false )
private

◆ LeadingRatLine()

◆ NearestUnconnectedAnchorPoint()

◆ NearestUnconnectedItem()

ITEM * PNS::TOPOLOGY::NearestUnconnectedItem ( const JOINT * aStart,
int * aAnchor = nullptr,
int aKindMask = ITEM::ANY_T )

◆ ShortestConnectionLength()

int64_t PNS::TOPOLOGY::ShortestConnectionLength ( ITEM * aFrom,
ITEM * aTo )

◆ SimplifyLine()

◆ walkTuningPath()

Member Data Documentation

◆ m_iface

ROUTER_IFACE* PNS::TOPOLOGY::m_iface
private

Definition at line 151 of file pns_topology.h.

Referenced by NearestUnconnectedAnchorPoint(), NearestUnconnectedItem(), and TOPOLOGY().

◆ m_world


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