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

#include <pns_topology.h>

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, 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 (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 std::set< ITEM * > AssembleCluster (ITEM *aStart, int aLayer)
 

Private Member Functions

bool followTrivialPath (LINE *aLine, bool aLeft, ITEM_SET &aSet, const JOINT **aTerminalJoint=nullptr, bool aFollowLockedSegments=false)
 

Private Attributes

const int DP_PARALLELITY_THRESHOLD = 5
 
NODEm_world
 

Detailed Description

Definition at line 39 of file pns_topology.h.

Member Typedef Documentation

◆ JOINT_SET

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

Definition at line 42 of file pns_topology.h.

Constructor & Destructor Documentation

◆ TOPOLOGY()

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

Definition at line 44 of file pns_topology.h.

◆ ~TOPOLOGY()

PNS::TOPOLOGY::~TOPOLOGY ( )
inline

Definition at line 47 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 276 of file pns_topology.cpp.

References PNS::ITEM::ARC_T, PNS::NODE::AssembleLine(), PNS::JOINT::CLinks(), PNS::NODE::FindJoint(), 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 ( 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 332 of file pns_topology.cpp.

References SEG::A, AssembleTrivialPath(), SEG::B, PNS::LINE::CLine(), SHAPE_LINE_CHAIN::CPoint(), SHAPE_LINE_CHAIN::CPoints(), delta, ERROR_INSIDE, SHAPE_LINE_CHAIN::GetPoint(), SHAPE_LINE_CHAIN::Insert(), PNS::ITEM::Layer(), PNS::LINE::Line(), PNS::ITEM::LINE_T, PNS::JOINT::LinkList(), PCB_PAD_T, SHAPE_LINE_CHAIN::PointCount(), PNS::JOINT::Pos(), SHAPE_LINE_CHAIN::Remove(), SHAPE_LINE_CHAIN::Replace(), 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 456 of file pns_topology.cpp.

◆ ConnectedItems() [2/2]

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

Definition at line 462 of file pns_topology.cpp.

◆ ConnectedJoints()

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

◆ followTrivialPath()

◆ LeadingRatLine()

bool PNS::TOPOLOGY::LeadingRatLine ( const LINE aTrack,
SHAPE_LINE_CHAIN aRatLine 
)

◆ 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 96 of file pns_topology.h.

Referenced by AssembleDiffPair().

◆ m_world


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