|
KiCad PCB EDA Suite
|
Build a topological view of a single named net chain's routed copper. More...
#include <drc_chain_topology.h>
Classes | |
| struct | STUB |
Public Types | |
| enum class | STATUS { OK , NO_ITEMS , NO_TERMINAL_PADS , DISCONNECTED , CYCLE_DETECTED } |
Public Member Functions | |
| CHAIN_TOPOLOGY (BOARD *aBoard, const wxString &aChainName, const std::set< BOARD_CONNECTED_ITEM * > &aChainItems) | |
| STATUS | GetStatus () const |
| bool | IsValid () const |
| double | TrunkLength () const |
| double | TrunkDelay () const |
| const std::vector< STUB > & | Stubs () const |
| const wxString & | GetChainName () const |
Private Attributes | |
| wxString | m_chainName |
| STATUS | m_status = STATUS::NO_ITEMS |
| double | m_trunkLength = 0.0 |
| double | m_trunkDelay = 0.0 |
| std::vector< STUB > | m_stubs |
Build a topological view of a single named net chain's routed copper.
The chain is modeled as a graph with (x, y, layer) nodes. Tracks and arcs contribute one edge each between their endpoints; vias contribute one edge per adjacent copper layer pair within their layer span; series passives (enumerated via EnumerateChainBridges) contribute one edge between their cross-net pads on the footprint placement layer. Mid-segment T-junctions are detected via shape collision and the trunk track is split at the contact point so the stub branches off the actual junction.
When both terminal pads (NETINFO_ITEM::GetTerminalPad(0/1)) are present and connected by a unique simple path, GetStatus() returns OK and:
When the topology cannot be reduced to a tree with both terminals reachable, callers fall back to legacy aggregate / proxy semantics.
Definition at line 56 of file drc_chain_topology.h.
|
strong |
| Enumerator | |
|---|---|
| OK | |
| NO_ITEMS | |
| NO_TERMINAL_PADS | |
| DISCONNECTED | |
| CYCLE_DETECTED | |
Definition at line 68 of file drc_chain_topology.h.
| CHAIN_TOPOLOGY::CHAIN_TOPOLOGY | ( | BOARD * | aBoard, |
| const wxString & | aChainName, | ||
| const std::set< BOARD_CONNECTED_ITEM * > & | aChainItems ) |
Definition at line 487 of file drc_chain_topology.cpp.
References LSET::AllCuMask(), CHAIN_TOPOLOGY::STUB::branchLayer, CHAIN_TOPOLOGY::STUB::branchPoint, ChainBridgingDelayPerMm(), LSET::CuStack(), CYCLE_DETECTED, CHAIN_TOPOLOGY::STUB::delay, DISCONNECTED, EnumerateChainBridges(), F_Cu, PCB_TRACK::GetEnd(), BOARD_CONNECTED_ITEM::GetLayer(), FOOTPRINT::GetLayer(), PCB_TRACK::GetLength(), BOARD::GetLengthCalculation(), BOARD_ITEM::GetParentFootprint(), PCB_TRACK::GetStart(), index, BOARD::IsEmpty(), CHAIN_TOPOLOGY::STUB::items, CHAIN_TOPOLOGY::STUB::length, m_chainName, m_status, m_stubs, m_trunkDelay, m_trunkLength, NO_TERMINAL_PADS, OK, pad, PCB_ARC_T, PCB_PAD_T, PCB_TRACE_T, PCB_VIA_T, UNDEFINED_LAYER, and via.
|
inline |
Definition at line 88 of file drc_chain_topology.h.
References m_chainName.
|
inline |
Definition at line 80 of file drc_chain_topology.h.
References m_status.
Referenced by BOOST_AUTO_TEST_CASE().
|
inline |
Definition at line 81 of file drc_chain_topology.h.
Referenced by BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
inline |
Definition at line 86 of file drc_chain_topology.h.
References m_stubs.
Referenced by BOOST_AUTO_TEST_CASE().
|
inline |
Definition at line 84 of file drc_chain_topology.h.
References m_trunkDelay.
|
inline |
Definition at line 83 of file drc_chain_topology.h.
References m_trunkLength.
Referenced by BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
private |
Definition at line 91 of file drc_chain_topology.h.
Referenced by CHAIN_TOPOLOGY(), and GetChainName().
|
private |
Definition at line 92 of file drc_chain_topology.h.
Referenced by CHAIN_TOPOLOGY(), GetStatus(), and IsValid().
|
private |
Definition at line 95 of file drc_chain_topology.h.
Referenced by CHAIN_TOPOLOGY(), and Stubs().
|
private |
Definition at line 94 of file drc_chain_topology.h.
Referenced by CHAIN_TOPOLOGY(), and TrunkDelay().
|
private |
Definition at line 93 of file drc_chain_topology.h.
Referenced by CHAIN_TOPOLOGY(), and TrunkLength().