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

#include <pns_topology.h>

Classes

struct  CLUSTER
 
struct  PATH_RESULT
 

Public Types

typedef std::set< const JOINT * > JOINT_SET
 

Public Member Functions

 TOPOLOGY (NODE *aNode)
 
 ~TOPOLOGY ()
 
bool SimplifyLine (LINE *aLine)
 
ITEMNearestUnconnectedItem (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)
 

Private Member Functions

PATH_RESULT followBranch (const JOINT *aJoint, 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

const int DP_PARALLELITY_THRESHOLD = 5
 
NODEm_world
 

Detailed Description

Definition at line 41 of file pns_topology.h.

Member Typedef Documentation

◆ JOINT_SET

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

Definition at line 51 of file pns_topology.h.

Constructor & Destructor Documentation

◆ TOPOLOGY()

PNS::TOPOLOGY::TOPOLOGY ( NODE * aNode)
inline

Definition at line 53 of file pns_topology.h.

References m_world.

Referenced by NearestUnconnectedAnchorPoint().

◆ ~TOPOLOGY()

PNS::TOPOLOGY::~TOPOLOGY ( )
inline

Definition at line 56 of file pns_topology.h.

Member Function Documentation

◆ AssembleCluster()

◆ AssembleDiffPair() [1/2]

◆ AssembleDiffPair() [2/2]

const DIFF_PAIR PNS::TOPOLOGY::AssembleDiffPair ( SEGMENT * aStart)

◆ 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 307 of file pns_topology.cpp.

References PNS::ITEM::ARC_T, PNS::JOINT::CLinks(), followTrivialPath(), PNS::JOINT::IsNonFanoutVia(), PNS::ITEM::Kind(), m_world, PNS::ITEM::OfKind(), path, PNS::ITEM::SEGMENT_T, via, and PNS::ITEM::VIA_T.

Referenced by AssembleTuningPath(), and 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
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 360 of file pns_topology.cpp.

References AssembleTrivialPath(), PNS::ROUTER_IFACE::GetBoardLayerFromPNSLayer(), PNS::ITEM::Layer(), PNS::LINE::Line(), PNS::ITEM::LINE_T, PNS::JOINT::LinkList(), LENGTH_DELAY_CALCULATION::OptimiseTraceInPad(), PCB_PAD_T, PNS::ITEM_SET::Size(), PNS::ITEM::SOLID_T, and EDA_ITEM::Type().

Referenced by 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 425 of file pns_topology.cpp.

◆ ConnectedItems() [2/2]

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

Definition at line 431 of file pns_topology.cpp.

◆ ConnectedJoints()

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

Definition at line 64 of file pns_topology.cpp.

References PNS::JOINT::LinkList(), m_world, next(), and PNS::ITEM::SEGMENT_T.

Referenced by NearestUnconnectedItem().

◆ 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()

Member Data Documentation

◆ DP_PARALLELITY_THRESHOLD

const int PNS::TOPOLOGY::DP_PARALLELITY_THRESHOLD = 5
private

Definition at line 105 of file pns_topology.h.

Referenced by AssembleDiffPair().

◆ m_world


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