KiCad PCB EDA Suite
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
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 (int aStartLayer, int aEndLayer)
 Set the layers spanned by the item to aStartLayer and aEndLayer.
 
void SetLayer (int aLayer)
 Set the layers spanned by the item to a single layer aLayer.
 
int StartLayer () const
 Return the contiguous set of layers spanned by the item.
 
int EndLayer () const
 
virtual int Layer () const
 Return the item's layer, for single-layered items only.
 
PCB_LAYER_ID GetBoardLayer () const
 When using CN_ITEM layers to compare against board items, use this function which correctly remaps the B_Cu layer.
 
const BOX2IBBox ()
 
BOARD_CONNECTED_ITEMParent () const
 
const std::vector< CN_ITEM * > & ConnectedItems () const
 
void ClearConnections ()
 
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
 
int m_start_layer
 start layer of the item N.B. B_Cu is set to INT_MAX
 
int m_end_layer
 end layer of the item N.B. B_Cu is set to INT_MAX
 
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_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 283 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.

◆ BBox()

const BOX2I & CN_ITEM::BBox ( )
inlineinherited

◆ BuildRTree()

void CN_ZONE_LAYER::BuildRTree ( )
inline

◆ CanChangeNet()

bool CN_ITEM::CanChangeNet ( ) const
inlineinherited

Definition at line 234 of file connectivity_items.h.

References CN_ITEM::m_canChangeNet.

Referenced by CN_VISITOR::operator()().

◆ ClearConnections()

void CN_ITEM::ClearConnections ( )
inlineinherited

Definition at line 232 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().

◆ EndLayer()

int CN_ITEM::EndLayer ( ) const
inlineinherited

Definition at line 195 of file connectivity_items.h.

References CN_ITEM::m_end_layer.

Referenced by CN_LIST::FindNearby().

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

◆ GetBoardLayer()

PCB_LAYER_ID CN_ITEM::GetBoardLayer ( ) const
inlineinherited

When using CN_ITEM layers to compare against board items, use this function which correctly remaps the B_Cu layer.

Definition at line 211 of file connectivity_items.h.

References B_Cu, CN_ITEM::Layer(), and ToLAYER_ID().

Referenced by RN_NET::OptimizeRNEdges().

◆ GetLayer() [1/2]

PCB_LAYER_ID CN_ZONE_LAYER::GetLayer ( )
inline

Definition at line 349 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 354 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.

N.B. This should only be used inside connectivity as B_Cu is mapped to a large int

Definition at line 202 of file connectivity_items.h.

References CN_ITEM::StartLayer().

Referenced by CN_ITEM::GetBoardLayer().

◆ 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 189 of file connectivity_items.h.

References CN_ITEM::SetLayers().

Referenced by CN_LIST::Add().

◆ SetLayers()

void CN_ITEM::SetLayers ( int  aStartLayer,
int  aEndLayer 
)
inlineinherited

Set the layers spanned by the item to aStartLayer and aEndLayer.

Definition at line 172 of file connectivity_items.h.

References B_Cu, CN_ITEM::m_end_layer, and CN_ITEM::m_start_layer.

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

◆ SetValid()

void CN_ITEM::SetValid ( bool  aValid)
inlineinherited

Definition at line 163 of file connectivity_items.h.

References CN_ITEM::m_valid.

◆ StartLayer()

int CN_ITEM::StartLayer ( ) const
inlineinherited

Return the contiguous set of layers spanned by the item.

Definition at line 194 of file connectivity_items.h.

References CN_ITEM::m_start_layer.

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

◆ SubpolyIndex()

int CN_ZONE_LAYER::SubpolyIndex ( ) const
inline

◆ Valid()

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 263 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 271 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 259 of file connectivity_items.h.

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

◆ m_end_layer

int CN_ITEM::m_end_layer
protectedinherited

end layer of the item N.B. B_Cu is set to INT_MAX

Definition at line 262 of file connectivity_items.h.

Referenced by CN_ITEM::CN_ITEM(), CN_ITEM::EndLayer(), and CN_ITEM::SetLayers().

◆ m_fillPoly

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

Definition at line 392 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 391 of file connectivity_items.h.

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

◆ m_listLock

std::mutex CN_ITEM::m_listLock
privateinherited

mutex protecting this item's connected_items set to

Definition at line 275 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 393 of file connectivity_items.h.

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

◆ m_start_layer

int CN_ITEM::m_start_layer
protectedinherited

start layer of the item N.B. B_Cu is set to INT_MAX

Definition at line 261 of file connectivity_items.h.

Referenced by CN_ITEM::CN_ITEM(), CN_ITEM::SetLayers(), and CN_ITEM::StartLayer().

◆ 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 273 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_zone

ZONE* CN_ZONE_LAYER::m_zone
private

Definition at line 389 of file connectivity_items.h.

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


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