KiCad PCB EDA Suite
Loading...
Searching...
No Matches
CN_ZONE_LAYER Class Reference

#include <connectivity_items.h>

Inheritance diagram for CN_ZONE_LAYER:
CN_ITEM

Public Member Functions

 CN_ZONE_LAYER (ZONE *aParent, PCB_LAYER_ID aLayer, int aSubpolyIndex)
 
void BuildRTree ()
 
int SubpolyIndex () const
 
PCB_LAYER_ID GetLayer () const
 
bool ContainsPoint (const VECTOR2I &p) const
 
PCB_LAYER_ID GetLayer ()
 
virtual int AnchorCount () const override
 
virtual const VECTOR2I GetAnchor (int n) const override
 
const SHAPE_LINE_CHAINGetOutline () const
 
bool Collide (SHAPE *aRefShape) const
 
bool HasSingleConnection ()
 
void Dump ()
 
std::shared_ptr< CN_ANCHORAddAnchor (const VECTOR2I &aPos)
 
std::vector< std::shared_ptr< CN_ANCHOR > > & Anchors ()
 
void SetValid (bool aValid)
 
bool Valid () const
 
void SetDirty (bool aDirty)
 
bool Dirty () const
 
void SetLayers (const LAYER_RANGE &aLayers)
 Set the layers spanned by the item to aLayers.
 
void SetLayer (int aLayer)
 Set the layers spanned by the item to a single layer aLayer.
 
const LAYER_RANGELayers () const
 Return the contiguous set of layers spanned by the item.
 
virtual int Layer () const
 Return the item's layer, for single-layered items only.
 
const BOX2IBBox ()
 
BOARD_CONNECTED_ITEMParent () const
 
const std::vector< CN_ITEM * > & ConnectedItems () const
 
void ClearConnections ()
 
void SetVisited (bool aVisited)
 
bool Visited () const
 
bool CanChangeNet () const
 
void Connect (CN_ITEM *b)
 
void RemoveInvalidRefs ()
 
int Net () const
 

Protected Attributes

bool m_dirty
 used to identify recently added item not yet scanned into the connectivity search
 
LAYER_RANGE m_layers
 layer range over which the item exists
 
BOX2I m_bbox
 bounding box for the item
 

Private Attributes

ZONEm_zone
 
int m_subpolyIndex
 
PCB_LAYER_ID m_layer
 
std::shared_ptr< SHAPE_POLY_SETm_fillPoly
 
RTree< const SHAPE *, int, 2, double > m_rTree
 
BOARD_CONNECTED_ITEMm_parent
 
std::vector< CN_ITEM * > m_connected
 list of physically touching items
 
std::vector< std::shared_ptr< CN_ANCHOR > > m_anchors
 
bool m_canChangeNet
 can the net propagator modify the netcode?
 
bool m_visited
 visited flag for the BFS scan
 
bool m_valid
 used to identify garbage items (we use lazy removal)
 
std::mutex m_listLock
 mutex protecting this item's connected_items set to
 

Detailed Description

Definition at line 257 of file connectivity_items.h.

Constructor & Destructor Documentation

◆ CN_ZONE_LAYER()

CN_ZONE_LAYER::CN_ZONE_LAYER ( ZONE aParent,
PCB_LAYER_ID  aLayer,
int  aSubpolyIndex 
)
inline

Member Function Documentation

◆ AddAnchor()

std::shared_ptr< CN_ANCHOR > CN_ITEM::AddAnchor ( const VECTOR2I aPos)
inlineinherited

Definition at line 155 of file connectivity_items.h.

References CN_ITEM::m_anchors.

Referenced by CN_LIST::Add().

◆ AnchorCount()

int CN_ZONE_LAYER::AnchorCount ( ) const
overridevirtual

Reimplemented from CN_ITEM.

Definition at line 97 of file connectivity_items.cpp.

References ZONE::GetFilledPolysList(), m_layer, m_subpolyIndex, CN_ITEM::Parent(), and CN_ITEM::Valid().

◆ Anchors()

std::vector< std::shared_ptr< CN_ANCHOR > > & CN_ITEM::Anchors ( )
inlineinherited

Definition at line 161 of file connectivity_items.h.

References CN_ITEM::m_anchors.

Referenced by TRACKS_CLEANER::testTrackEndpointIsNode().

◆ BBox()

const BOX2I & CN_ITEM::BBox ( )
inlineinherited

◆ BuildRTree()

void CN_ZONE_LAYER::BuildRTree ( )
inline

◆ CanChangeNet()

bool CN_ITEM::CanChangeNet ( ) const
inlineinherited

Definition at line 208 of file connectivity_items.h.

References CN_ITEM::m_canChangeNet.

Referenced by CN_VISITOR::operator()().

◆ ClearConnections()

void CN_ITEM::ClearConnections ( )
inlineinherited

Definition at line 203 of file connectivity_items.h.

References CN_ITEM::m_connected.

◆ Collide()

◆ Connect()

void CN_ITEM::Connect ( CN_ITEM b)
inlineinherited

◆ ConnectedItems()

◆ ContainsPoint()

bool CN_ZONE_LAYER::ContainsPoint ( const VECTOR2I p) const
inline

◆ Dirty()

bool CN_ITEM::Dirty ( ) const
inlineinherited

Definition at line 167 of file connectivity_items.h.

References CN_ITEM::m_dirty.

Referenced by CN_ANCHOR::Dirty(), and CN_VISITOR::operator()().

◆ Dump()

void CN_ITEM::Dump ( )
inherited

Definition at line 85 of file connectivity_items.cpp.

References CN_ITEM::m_connected, EDA_ITEM::Type(), and CN_ITEM::Valid().

◆ GetAnchor()

const VECTOR2I CN_ZONE_LAYER::GetAnchor ( int  n) const
overridevirtual

Reimplemented from CN_ITEM.

Definition at line 108 of file connectivity_items.cpp.

References ZONE::GetFilledPolysList(), m_layer, m_subpolyIndex, CN_ITEM::Parent(), and CN_ITEM::Valid().

◆ GetLayer() [1/2]

PCB_LAYER_ID CN_ZONE_LAYER::GetLayer ( )
inline

Definition at line 323 of file connectivity_items.h.

References m_layer.

◆ GetLayer() [2/2]

PCB_LAYER_ID CN_ZONE_LAYER::GetLayer ( ) const
inline

◆ GetOutline()

const SHAPE_LINE_CHAIN & CN_ZONE_LAYER::GetOutline ( ) const
inline

Definition at line 328 of file connectivity_items.h.

References m_fillPoly, and m_subpolyIndex.

Referenced by RN_NET::OptimizeRNEdges().

◆ HasSingleConnection()

bool CN_ZONE_LAYER::HasSingleConnection ( )

◆ Layer()

virtual int CN_ITEM::Layer ( ) const
inlinevirtualinherited

Return the item's layer, for single-layered items only.

Definition at line 187 of file connectivity_items.h.

References CN_ITEM::Layers(), and LAYER_RANGE::Start().

Referenced by RN_NET::OptimizeRNEdges().

◆ Layers()

const LAYER_RANGE & CN_ITEM::Layers ( ) const
inlineinherited

Return the contiguous set of layers spanned by the item.

Definition at line 182 of file connectivity_items.h.

References CN_ITEM::m_layers.

Referenced by CN_LIST::FindNearby(), and CN_ITEM::Layer().

◆ Net()

◆ Parent()

◆ RemoveInvalidRefs()

void CN_ITEM::RemoveInvalidRefs ( )
inherited

Definition at line 136 of file connectivity_items.cpp.

References CN_ITEM::m_connected.

◆ SetDirty()

void CN_ITEM::SetDirty ( bool  aDirty)
inlineinherited

Definition at line 166 of file connectivity_items.h.

References CN_ITEM::m_dirty.

◆ SetLayer()

void CN_ITEM::SetLayer ( int  aLayer)
inlineinherited

Set the layers spanned by the item to a single layer aLayer.

Definition at line 177 of file connectivity_items.h.

References CN_ITEM::m_layers.

Referenced by CN_LIST::Add().

◆ SetLayers()

void CN_ITEM::SetLayers ( const LAYER_RANGE aLayers)
inlineinherited

Set the layers spanned by the item to aLayers.

Definition at line 172 of file connectivity_items.h.

References CN_ITEM::m_layers.

Referenced by CN_LIST::Add(), and CN_ZONE_LAYER().

◆ SetValid()

void CN_ITEM::SetValid ( bool  aValid)
inlineinherited

Definition at line 163 of file connectivity_items.h.

References CN_ITEM::m_valid.

◆ SetVisited()

void CN_ITEM::SetVisited ( bool  aVisited)
inlineinherited

Definition at line 205 of file connectivity_items.h.

References CN_ITEM::m_visited.

Referenced by CN_CONNECTIVITY_ALGO::SearchClusters().

◆ SubpolyIndex()

int CN_ZONE_LAYER::SubpolyIndex ( ) const
inline

◆ Valid()

◆ Visited()

bool CN_ITEM::Visited ( ) const
inlineinherited

Definition at line 206 of file connectivity_items.h.

References CN_ITEM::m_visited.

Member Data Documentation

◆ m_anchors

std::vector<std::shared_ptr<CN_ANCHOR> > CN_ITEM::m_anchors
privateinherited

◆ m_bbox

BOX2I CN_ITEM::m_bbox
protectedinherited

bounding box for the item

Definition at line 236 of file connectivity_items.h.

Referenced by CN_ITEM::BBox().

◆ m_canChangeNet

bool CN_ITEM::m_canChangeNet
privateinherited

can the net propagator modify the netcode?

Definition at line 244 of file connectivity_items.h.

Referenced by CN_ITEM::CanChangeNet(), and CN_ITEM::CN_ITEM().

◆ m_connected

std::vector<CN_ITEM*> CN_ITEM::m_connected
privateinherited

◆ m_dirty

bool CN_ITEM::m_dirty
protectedinherited

used to identify recently added item not yet scanned into the connectivity search

Definition at line 233 of file connectivity_items.h.

Referenced by CN_ITEM::BBox(), CN_ITEM::CN_ITEM(), CN_ITEM::Dirty(), and CN_ITEM::SetDirty().

◆ m_fillPoly

std::shared_ptr<SHAPE_POLY_SET> CN_ZONE_LAYER::m_fillPoly
private

Definition at line 366 of file connectivity_items.h.

Referenced by BuildRTree(), CN_ZONE_LAYER(), Collide(), ContainsPoint(), and GetOutline().

◆ m_layer

PCB_LAYER_ID CN_ZONE_LAYER::m_layer
private

Definition at line 365 of file connectivity_items.h.

Referenced by AnchorCount(), GetAnchor(), and GetLayer().

◆ m_layers

LAYER_RANGE CN_ITEM::m_layers
protectedinherited

layer range over which the item exists

Definition at line 235 of file connectivity_items.h.

Referenced by CN_ITEM::CN_ITEM(), CN_ITEM::Layers(), CN_ITEM::SetLayer(), and CN_ITEM::SetLayers().

◆ m_listLock

std::mutex CN_ITEM::m_listLock
privateinherited

mutex protecting this item's connected_items set to

Definition at line 249 of file connectivity_items.h.

Referenced by CN_ITEM::Connect().

◆ m_parent

◆ m_rTree

RTree<const SHAPE*, int, 2, double> CN_ZONE_LAYER::m_rTree
private

Definition at line 367 of file connectivity_items.h.

Referenced by BuildRTree(), Collide(), and ContainsPoint().

◆ m_subpolyIndex

int CN_ZONE_LAYER::m_subpolyIndex
private

◆ m_valid

bool CN_ITEM::m_valid
privateinherited

used to identify garbage items (we use lazy removal)

Definition at line 247 of file connectivity_items.h.

Referenced by CN_ITEM::AnchorCount(), CN_ITEM::BBox(), CN_ITEM::CN_ITEM(), CN_ITEM::GetAnchor(), CN_ITEM::Net(), CN_ITEM::SetValid(), and CN_ITEM::Valid().

◆ m_visited

bool CN_ITEM::m_visited
privateinherited

visited flag for the BFS scan

Definition at line 246 of file connectivity_items.h.

Referenced by CN_ITEM::CN_ITEM(), CN_ITEM::SetVisited(), and CN_ITEM::Visited().

◆ m_zone

ZONE* CN_ZONE_LAYER::m_zone
private

Definition at line 363 of file connectivity_items.h.

Referenced by BuildRTree(), Collide(), and ContainsPoint().


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