![]() |
KiCad PCB EDA Suite
|
CN_ANCHOR represents a physical location that can be connected: a pad or a track/arc/via endpoint. More...
#include <connectivity_items.h>
Public Member Functions | |
CN_ANCHOR () | |
CN_ANCHOR (const VECTOR2I &aPos, CN_ITEM *aItem) | |
bool | Valid () const |
CN_ITEM * | Item () const |
BOARD_CONNECTED_ITEM * | Parent () const |
const VECTOR2I & | Pos () const |
void | Move (const VECTOR2I &aPos) |
const unsigned int | Dist (const CN_ANCHOR &aSecond) |
Return tag, common identifier for connected nodes. More... | |
int | GetTag () const |
Set tag, common identifier for connected nodes. More... | |
void | SetTag (int aTag) |
Decide whether this node can be a ratsnest line target. More... | |
void | SetNoLine (bool aEnable) |
Return true if this node can be a target for ratsnest lines. More... | |
const bool & | GetNoLine () const |
void | SetCluster (std::shared_ptr< CN_CLUSTER > &aCluster) |
const std::shared_ptr< CN_CLUSTER > & | GetCluster () const |
bool | IsDangling () const |
The anchor point is dangling if the parent is a track and this anchor point is not connected to another item ( track, vias pad or zone) or if the parent is a via and this anchor point is connected to only one track and not to another item. More... | |
int | ConnectedItemsCount () const |
Static Public Attributes | |
static const int | TAG_UNCONNECTED = -1 |
Private Attributes | |
VECTOR2I | m_pos |
Position of the anchor. More... | |
CN_ITEM * | m_item = nullptr |
Pad or track/arc/via owning the anchor. More... | |
int | m_tag = -1 |
Tag for quick connection resolution. More... | |
bool | m_noline = false |
Whether it the node can be a target for ratsnest lines. More... | |
std::shared_ptr< CN_CLUSTER > | m_cluster |
Cluster to which the anchor belongs. More... | |
CN_ANCHOR represents a physical location that can be connected: a pad or a track/arc/via endpoint.
Definition at line 59 of file connectivity_items.h.
|
inline |
Definition at line 62 of file connectivity_items.h.
References m_item.
Definition at line 67 of file connectivity_items.h.
int CN_ANCHOR::ConnectedItemsCount | ( | ) | const |
Definition at line 392 of file connectivity_items.cpp.
References CN_ITEM::ConnectedItems(), ZONE::HitTestFilledArea(), m_cluster, m_item, PCB_ZONE_T, Pos(), and ToLAYER_ID().
|
inline |
Return tag, common identifier for connected nodes.
Definition at line 93 of file connectivity_items.h.
References EuclideanNorm(), m_pos, and Pos().
|
inline |
Definition at line 127 of file connectivity_items.h.
References m_cluster.
|
inline |
Definition at line 117 of file connectivity_items.h.
References m_noline.
|
inline |
Set tag, common identifier for connected nodes.
Definition at line 99 of file connectivity_items.h.
References m_tag.
bool CN_ANCHOR::IsDangling | ( | ) | const |
The anchor point is dangling if the parent is a track and this anchor point is not connected to another item ( track, vias pad or zone) or if the parent is a via and this anchor point is connected to only one track and not to another item.
Definition at line 347 of file connectivity_items.cpp.
References CN_ITEM::AnchorCount(), CN_ITEM::ConnectedItems(), ZONE::HitTestFilledArea(), KiROUND(), m_cluster, m_item, Parent(), PCB_ARC_T, PCB_TRACE_T, PCB_VIA_T, PCB_ZONE_T, Pos(), ToLAYER_ID(), and EDA_ITEM::Type().
|
inline |
Definition at line 76 of file connectivity_items.h.
References m_item.
|
inline |
BOARD_CONNECTED_ITEM * CN_ANCHOR::Parent | ( | ) | const |
Definition at line 331 of file connectivity_items.cpp.
References m_item, CN_ITEM::Parent(), and CN_ITEM::Valid().
Referenced by IsDangling().
|
inline |
Definition at line 83 of file connectivity_items.h.
References m_pos.
Referenced by ConnectedItemsCount(), Dist(), and IsDangling().
|
inline |
Definition at line 122 of file connectivity_items.h.
References m_cluster.
|
inline |
Return true if this node can be a target for ratsnest lines.
Definition at line 111 of file connectivity_items.h.
References m_noline.
|
inline |
Decide whether this node can be a ratsnest line target.
Definition at line 105 of file connectivity_items.h.
References m_tag.
bool CN_ANCHOR::Valid | ( | ) | const |
Definition at line 338 of file connectivity_items.cpp.
References m_item, and CN_ITEM::Valid().
|
private |
Cluster to which the anchor belongs.
Definition at line 155 of file connectivity_items.h.
Referenced by ConnectedItemsCount(), GetCluster(), IsDangling(), and SetCluster().
|
private |
Pad or track/arc/via owning the anchor.
Definition at line 151 of file connectivity_items.h.
Referenced by CN_ANCHOR(), ConnectedItemsCount(), IsDangling(), Item(), Parent(), and Valid().
|
private |
Whether it the node can be a target for ratsnest lines.
Definition at line 153 of file connectivity_items.h.
Referenced by GetNoLine(), and SetNoLine().
|
private |
Position of the anchor.
Definition at line 150 of file connectivity_items.h.
Referenced by CN_ANCHOR(), Dist(), Move(), and Pos().
|
private |
Tag for quick connection resolution.
Definition at line 152 of file connectivity_items.h.
|
static |
Definition at line 147 of file connectivity_items.h.