30#ifndef __CONNECTIVITY_ALGO_H 
   31#define __CONNECTIVITY_ALGO_H 
   50class CN_RATSNEST_NODES;
 
   70    CN_EDGE( 
const std::shared_ptr<CN_ANCHOR>& aSource, 
const std::shared_ptr<CN_ANCHOR>& aTarget,
 
   71             unsigned aWeight = 0 ) :
 
 
  107        if( thisPos.
x != otherPos.
x )
 
  108            return thisPos.
x < otherPos.
x;
 
  110        if( thisPos.
y != otherPos.
y )
 
  111            return thisPos.
y < otherPos.
y;
 
 
 
  171    using CLUSTERS = std::vector<std::shared_ptr<CN_CLUSTER>>;
 
  190                item->SetValid( 
false );
 
 
 
  236        for( 
size_t ii = 0; ii < 
m_dirtyNets.size(); ii++ )
 
 
  244            int net = cl->OriginNet();
 
  247                aClusters.push_back( cl );
 
 
  257    void LocalBuild( 
const std::shared_ptr<CONNECTIVITY_DATA>& aGlobalConnectivity,
 
  258                     const std::vector<BOARD_ITEM*>& aLocalItems );
 
  278                                 bool aConnectivityAlreadyRebuilt );
 
  287    template <
typename Func>
 
  292            for( std::shared_ptr<CN_ANCHOR>& 
anchor : item->Anchors() )
 
 
  297    template <
typename Func>
 
  314    template <
class Container, 
class BItem>
 
  315    void add( Container& c, BItem brditem )
 
  317        CN_ITEM* item = c.Add( brditem );
 
 
  329    std::unordered_map<const BOARD_ITEM*, ITEM_MAP_ENTRY> 
m_itemMap;
 
 
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
 
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
 
Information pertinent to a Pcbnew printed circuit board.
 
ITEM_MAP_ENTRY(CN_ITEM *aItem=nullptr)
 
const std::list< CN_ITEM * > & GetItems() const
 
void MarkItemsAsInvalid()
 
std::list< CN_ITEM * > m_items
 
void Link(CN_ITEM *aItem)
 
void FillIsolatedIslandsMap(std::map< ZONE *, std::map< PCB_LAYER_ID, ISOLATED_ISLANDS > > &aMap, bool aConnectivityAlreadyRebuilt)
Fill in the isolated islands map with copper islands that are not connected to a net.
 
bool Remove(BOARD_ITEM *aItem)
 
bool ItemExists(const BOARD_CONNECTED_ITEM *aItem) const
 
void ForEachItem(Func &&aFunc) const
 
CN_CONNECTIVITY_ALGO(CONNECTIVITY_DATA *aParentConnectivityData)
 
CONNECTIVITY_DATA * m_parentConnectivityData
 
void add(Container &c, BItem brditem)
 
PROGRESS_REPORTER * m_progressReporter
 
std::vector< std::shared_ptr< CN_CLUSTER > > m_connClusters
 
ITEM_MAP_ENTRY & ItemEntry(const BOARD_CONNECTED_ITEM *aItem)
 
void GetDirtyClusters(CLUSTERS &aClusters) const
 
void propagateConnections(BOARD_COMMIT *aCommit=nullptr)
 
const CLUSTERS & GetClusters()
 
void LocalBuild(const std::shared_ptr< CONNECTIVITY_DATA > &aGlobalConnectivity, const std::vector< BOARD_ITEM * > &aLocalItems)
 
void MarkNetAsDirty(int aNet)
 
const CLUSTERS SearchClusters(CLUSTER_SEARCH_MODE aMode, bool aExcludeZones, int aSingleNet)
 
void markItemNetAsDirty(const BOARD_ITEM *aItem)
 
std::vector< std::shared_ptr< CN_CLUSTER > > m_ratsnestClusters
 
void ForEachAnchor(Func &&aFunc) const
 
void PropagateNets(BOARD_COMMIT *aCommit=nullptr)
Propagate nets from pads to other items in clusters.
 
std::shared_ptr< CONNECTIVITY_DATA > m_globalConnectivityData
 
const CN_LIST & ItemList() const
 
bool IsNetDirty(int aNet) const
 
std::vector< bool > m_dirtyNets
 
std::unordered_map< const BOARD_ITEM *, ITEM_MAP_ENTRY > m_itemMap
 
void SetProgressReporter(PROGRESS_REPORTER *aReporter)
 
std::vector< std::shared_ptr< CN_CLUSTER > > CLUSTERS
 
void Build(BOARD *aBoard, PROGRESS_REPORTER *aReporter=nullptr)
 
bool Add(BOARD_ITEM *aItem)
 
std::shared_ptr< const CN_ANCHOR > GetSourceNode() const
 
std::shared_ptr< const CN_ANCHOR > m_target
 
bool StableSortCompare(const CN_EDGE &aOther) const
Comparison operator for std::stable_sort.
 
void SetTargetNode(const std::shared_ptr< const CN_ANCHOR > &aNode)
 
void SetWeight(unsigned weight)
 
void SetSourceNode(const std::shared_ptr< const CN_ANCHOR > &aNode)
 
void SetVisible(bool aVisible)
 
unsigned GetWeight() const
 
std::shared_ptr< const CN_ANCHOR > GetTargetNode() const
 
const VECTOR2I GetTargetPos() const
 
unsigned GetLength() const
 
std::shared_ptr< const CN_ANCHOR > m_source
 
CN_EDGE(const std::shared_ptr< CN_ANCHOR > &aSource, const std::shared_ptr< CN_ANCHOR > &aTarget, unsigned aWeight=0)
 
const VECTOR2I GetSourcePos() const
 
bool operator<(CN_EDGE aOther) const
This sort operator provides a sort-by-weight for the ratsnest operation.
 
CN_ITEM represents a BOARD_CONNETED_ITEM in the connectivity system (ie: a pad, track/arc/via,...
 
CN_VISITOR(CN_ITEM *aItem)
 
void checkZoneItemConnection(CN_ZONE_LAYER *aZoneLayer, CN_ITEM *aItem)
 
CN_ITEM * m_item
The item we are looking for connections to.
 
void checkZoneZoneConnection(CN_ZONE_LAYER *aZoneLayerA, CN_ZONE_LAYER *aZoneLayerB)
 
bool operator()(CN_ITEM *aCandidate)
 
A progress reporter interface for use in multi-threaded environments.
 
Handle a list of polygons defining a copper zone.
 
VECTOR2< int32_t > VECTOR2I