30 #ifndef __CONNECTIVITY_ALGO_H 31 #define __CONNECTIVITY_ALGO_H 52 class CN_CONNECTIVITY_ALGO_IMPL;
53 class CN_RATSNEST_NODES;
148 item->SetValid(
false );
196 int net = cl->OriginNet();
199 aClusters.push_back( cl );
209 void Build(
const std::vector<BOARD_ITEM*>& aItems );
247 template <
typename Func>
252 for(
auto&&
anchor : item->Anchors() )
257 template <
typename Func>
273 template <
class Container,
class BItem>
274 void add( Container& c, BItem brditem )
276 auto item = c.Add( brditem );
285 std::unordered_map<const BOARD_ITEM*, ITEM_MAP_ENTRY>
m_itemMap;
void SetSourceNode(const CN_ANCHOR_PTR &aNode)
bool operator<(CN_EDGE aOther) const
This sort operator provides a sort-by-weight for the ratsnest operation.
void Link(CN_ITEM *aItem)
bool Remove(BOARD_ITEM *aItem)
PROPAGATE_MODE
Controls how nets are propagated through clusters.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
void checkZoneItemConnection(CN_ZONE_LAYER *aZoneLayer, CN_ITEM *aItem)
A progress reporter interface for use in multi-threaded environments.
CN_ANCHOR_PTR GetTargetNode() const
const std::list< CN_ITEM * > GetItems() const
void MarkNetAsDirty(int aNet)
bool Add(BOARD_ITEM *aItem)
void FindIsolatedCopperIslands(ZONE *aZone, PCB_LAYER_ID aLayer, std::vector< int > &aIslands)
void add(Container &c, BItem brditem)
ITEM_MAP_ENTRY(CN_ITEM *aItem=nullptr)
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
void GetDirtyClusters(CLUSTERS &aClusters) const
bool ItemExists(const BOARD_CONNECTED_ITEM *aItem) const
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
std::vector< bool > m_dirtyNets
void PropagateNets(BOARD_COMMIT *aCommit=nullptr, PROPAGATE_MODE aMode=PROPAGATE_MODE::SKIP_CONFLICTS)
Propagate nets from pads to other items in clusters.
const CLUSTERS SearchClusters(CLUSTER_SEARCH_MODE aMode, const KICAD_T aTypes[], int aSingleNet)
void MarkItemsAsInvalid()
void markItemNetAsDirty(const BOARD_ITEM *aItem)
void ForEachItem(Func &&aFunc) const
std::list< CN_ITEM * > m_items
ITEM_MAP_ENTRY & ItemEntry(const BOARD_CONNECTED_ITEM *aItem)
void propagateConnections(BOARD_COMMIT *aCommit=nullptr, PROPAGATE_MODE aMode=PROPAGATE_MODE::SKIP_CONFLICTS)
const CN_LIST & ItemList() const
unsigned GetWeight() const
void SetTargetNode(const CN_ANCHOR_PTR &aNode)
void checkZoneZoneConnection(CN_ZONE_LAYER *aZoneLayerA, CN_ZONE_LAYER *aZoneLayerB)
Handle a list of polygons defining a copper zone.
void SetVisible(bool aVisible)
CN_EDGE(CN_ANCHOR_PTR aSource, CN_ANCHOR_PTR aTarget, unsigned aWeight=0)
void SetWeight(unsigned weight)
void ForEachAnchor(Func &&aFunc) const
CLUSTERS m_ratsnestClusters
bool operator()(CN_ITEM *aCandidate)
bool IsNetDirty(int aNet) const
const CLUSTERS & GetClusters()
void Build(BOARD *aBoard, PROGRESS_REPORTER *aReporter=nullptr)
CN_EDGE represents a point-to-point connection, whether realized or unrealized (ie: tracks etc.
Information pertinent to a Pcbnew printed circuit board.
PCB_LAYER_ID
A quick note on layer IDs:
CN_ITEM represents a BOARD_CONNETED_ITEM in the connectivity system (ie: a pad, track/arc/via,...
std::shared_ptr< CN_ANCHOR > CN_ANCHOR_PTR
const VECTOR2I GetSourcePos() const
const VECTOR2I GetTargetPos() const
CN_ITEM * m_item
The item we are looking for connections to.
CN_VISITOR(CN_ITEM *aItem)
std::vector< CN_CLUSTER_PTR > CLUSTERS
std::unordered_map< const BOARD_ITEM *, ITEM_MAP_ENTRY > m_itemMap
CN_ANCHOR_PTR GetSourceNode() const
void SetProgressReporter(PROGRESS_REPORTER *aReporter)
PROGRESS_REPORTER * m_progressReporter