| 
    KiCad PCB EDA Suite
    
   | 
 
#include <connectivity_algo.h>
Classes | |
| class | ITEM_MAP_ENTRY | 
Public Types | |
| enum | CLUSTER_SEARCH_MODE { CSM_PROPAGATE , CSM_CONNECTIVITY_CHECK , CSM_RATSNEST } | 
| using | CLUSTERS = std::vector<std::shared_ptr<CN_CLUSTER>> | 
Public Member Functions | |
| CN_CONNECTIVITY_ALGO (CONNECTIVITY_DATA *aParentConnectivityData) | |
| ~CN_CONNECTIVITY_ALGO () | |
| bool | ItemExists (const BOARD_CONNECTED_ITEM *aItem) const | 
| ITEM_MAP_ENTRY & | ItemEntry (const BOARD_CONNECTED_ITEM *aItem) | 
| bool | IsNetDirty (int aNet) const | 
| void | ClearDirtyFlags () | 
| void | GetDirtyClusters (CLUSTERS &aClusters) const | 
| int | NetCount () const | 
| void | Build (BOARD *aBoard, PROGRESS_REPORTER *aReporter=nullptr) | 
| void | LocalBuild (const std::shared_ptr< CONNECTIVITY_DATA > &aGlobalConnectivity, const std::vector< BOARD_ITEM * > &aLocalItems) | 
| void | Clear () | 
| bool | Remove (BOARD_ITEM *aItem) | 
| bool | Add (BOARD_ITEM *aItem) | 
| const CLUSTERS | SearchClusters (CLUSTER_SEARCH_MODE aMode, bool aExcludeZones, int aSingleNet) | 
| const CLUSTERS | SearchClusters (CLUSTER_SEARCH_MODE aMode) | 
| void | PropagateNets (BOARD_COMMIT *aCommit=nullptr) | 
| Propagate nets from pads to other items in clusters.   | |
| 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.   | |
| const CLUSTERS & | GetClusters () | 
| const CN_LIST & | ItemList () const | 
| template<typename Func> | |
| void | ForEachAnchor (Func &&aFunc) const | 
| template<typename Func> | |
| void | ForEachItem (Func &&aFunc) const | 
| void | MarkNetAsDirty (int aNet) | 
| void | RemoveInvalidRefs () | 
| void | SetProgressReporter (PROGRESS_REPORTER *aReporter) | 
Private Member Functions | |
| void | searchConnections () | 
| void | propagateConnections (BOARD_COMMIT *aCommit=nullptr) | 
| template<class Container, class BItem> | |
| void | add (Container &c, BItem brditem) | 
| void | markItemNetAsDirty (const BOARD_ITEM *aItem) | 
| void | updateJumperPads () | 
Private Attributes | |
| CONNECTIVITY_DATA * | m_parentConnectivityData | 
| CN_LIST | m_itemList | 
| std::unordered_map< const BOARD_ITEM *, ITEM_MAP_ENTRY > | m_itemMap | 
| std::vector< std::shared_ptr< CN_CLUSTER > > | m_connClusters | 
| std::vector< std::shared_ptr< CN_CLUSTER > > | m_ratsnestClusters | 
| std::vector< bool > | m_dirtyNets | 
| bool | m_isLocal | 
| std::shared_ptr< CONNECTIVITY_DATA > | m_globalConnectivityData | 
| std::mutex | m_mutex | 
| PROGRESS_REPORTER * | m_progressReporter = nullptr | 
Definition at line 161 of file connectivity_algo.h.
| using CN_CONNECTIVITY_ALGO::CLUSTERS = std::vector<std::shared_ptr<CN_CLUSTER>> | 
Definition at line 171 of file connectivity_algo.h.
| Enumerator | |
|---|---|
| CSM_PROPAGATE | |
| CSM_CONNECTIVITY_CHECK | |
| CSM_RATSNEST | |
Definition at line 164 of file connectivity_algo.h.
      
  | 
  inline | 
Definition at line 206 of file connectivity_algo.h.
References m_isLocal, and m_parentConnectivityData.
      
  | 
  inline | 
Definition at line 211 of file connectivity_algo.h.
References Clear().
| bool CN_CONNECTIVITY_ALGO::Add | ( | BOARD_ITEM * | aItem | ) | 
Definition at line 104 of file connectivity_algo.cpp.
References add(), FP_JUST_ADDED, BOARD_ITEM::GetBoard(), BOARD::GetEnabledLayers(), BOARD_ITEM::GetLayer(), ZONE::GetLayerSet(), BOARD_ITEM::GetParentFootprint(), IsCopperLayer(), BOARD_ITEM::IsOnCopperLayer(), m_itemList, m_itemMap, markItemNetAsDirty(), MarkNetAsDirty(), pad, PCB_ARC_T, PCB_FOOTPRINT_T, PCB_NETINFO_T, PCB_PAD_T, PCB_SHAPE_T, PCB_TRACE_T, PCB_VIA_T, PCB_ZONE_T, LSET::RunOnLayers(), and EDA_ITEM::Type().
Referenced by Build(), FillIsolatedIslandsMap(), and LocalBuild().
      
  | 
  inlineprivate | 
| void CN_CONNECTIVITY_ALGO::Build | ( | BOARD * | aBoard, | 
| PROGRESS_REPORTER * | aReporter = nullptr ) | 
Definition at line 418 of file connectivity_algo.cpp.
References Add(), PROGRESS_REPORTER::AdvanceProgress(), LSET::AllCuMask(), BOARD::Drawings(), BOARD::Footprints(), BOARD_ITEM::GetBoard(), BOARD::GetEnabledLayers(), GetKiCadThreadPool(), PROGRESS_REPORTER::IsCancelled(), PROGRESS_REPORTER::KeepRefreshing(), m_itemList, m_itemMap, markItemNetAsDirty(), pad, LSET::RunOnLayers(), PROGRESS_REPORTER::SetCurrentProgress(), tp, BOARD::Tracks(), and BOARD::Zones().
| void CN_CONNECTIVITY_ALGO::Clear | ( | ) | 
Definition at line 929 of file connectivity_algo.cpp.
References m_connClusters, m_itemList, m_itemMap, and m_ratsnestClusters.
Referenced by ~CN_CONNECTIVITY_ALGO().
      
  | 
  inline | 
Definition at line 234 of file connectivity_algo.h.
References m_dirtyNets.
| void CN_CONNECTIVITY_ALGO::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.
Definition at line 646 of file connectivity_algo.cpp.
References Add(), CSM_CONNECTIVITY_CHECK, CN_ZONE_LAYER::HasSingleConnection(), m_connClusters, m_progressReporter, Remove(), SearchClusters(), and CN_ZONE_LAYER::SubpolyIndex().
      
  | 
  inline | 
Definition at line 288 of file connectivity_algo.h.
References anchor, and m_itemList.
      
  | 
  inline | 
Definition at line 298 of file connectivity_algo.h.
References m_itemList.
| const CN_CONNECTIVITY_ALGO::CLUSTERS & CN_CONNECTIVITY_ALGO::GetClusters | ( | ) | 
Definition at line 702 of file connectivity_algo.cpp.
References CSM_RATSNEST, m_ratsnestClusters, and SearchClusters().
      
  | 
  inline | 
Definition at line 240 of file connectivity_algo.h.
References m_dirtyNets, and m_ratsnestClusters.
      
  | 
  inline | 
Definition at line 226 of file connectivity_algo.h.
References m_dirtyNets.
      
  | 
  inline | 
Definition at line 221 of file connectivity_algo.h.
References m_itemMap.
Referenced by CONNECTIVITY_DATA::TestTrackEndpointDangling().
      
  | 
  inline | 
Definition at line 216 of file connectivity_algo.h.
References m_itemMap.
      
  | 
  inline | 
Definition at line 282 of file connectivity_algo.h.
References m_itemList.
| void CN_CONNECTIVITY_ALGO::LocalBuild | ( | const std::shared_ptr< CONNECTIVITY_DATA > & | aGlobalConnectivity, | 
| const std::vector< BOARD_ITEM * > & | aLocalItems ) | 
Definition at line 557 of file connectivity_algo.cpp.
References Add(), m_globalConnectivityData, m_isLocal, PCB_ARC_T, PCB_FOOTPRINT_T, PCB_PAD_T, PCB_SHAPE_T, PCB_TRACE_T, and PCB_VIA_T.
      
  | 
  private | 
Definition at line 84 of file connectivity_algo.cpp.
References BOARD_CONNECTED_ITEM::GetNetCode(), BOARD_ITEM::IsConnected(), MarkNetAsDirty(), pad, FOOTPRINT::Pads(), PCB_FOOTPRINT_T, and EDA_ITEM::Type().
| void CN_CONNECTIVITY_ALGO::MarkNetAsDirty | ( | int | aNet | ) | 
Definition at line 709 of file connectivity_algo.cpp.
References m_dirtyNets.
Referenced by Add(), markItemNetAsDirty(), and propagateConnections().
      
  | 
  inline | 
Definition at line 251 of file connectivity_algo.h.
References m_dirtyNets.
      
  | 
  private | 
Definition at line 583 of file connectivity_algo.cpp.
References m_connClusters, MarkNetAsDirty(), and COMMIT::Modify().
Referenced by PropagateNets().
| void CN_CONNECTIVITY_ALGO::PropagateNets | ( | BOARD_COMMIT * | aCommit = nullptr | ) | 
Propagate nets from pads to other items in clusters.
| aCommit | is used to store undo information for items modified by the call. | 
Definition at line 638 of file connectivity_algo.cpp.
References CSM_PROPAGATE, m_connClusters, propagateConnections(), SearchClusters(), and updateJumperPads().
| bool CN_CONNECTIVITY_ALGO::Remove | ( | BOARD_ITEM * | aItem | ) | 
Definition at line 46 of file connectivity_algo.cpp.
References m_itemList, m_itemMap, markItemNetAsDirty(), pad, PCB_ARC_T, PCB_FOOTPRINT_T, PCB_PAD_T, PCB_SHAPE_T, PCB_TRACE_T, PCB_VIA_T, PCB_ZONE_T, and EDA_ITEM::Type().
Referenced by FillIsolatedIslandsMap().
| void CN_CONNECTIVITY_ALGO::RemoveInvalidRefs | ( | ) | 
Definition at line 222 of file connectivity_algo.cpp.
References m_itemList.
| const CN_CONNECTIVITY_ALGO::CLUSTERS CN_CONNECTIVITY_ALGO::SearchClusters | ( | CLUSTER_SEARCH_MODE | aMode | ) | 
Definition at line 317 of file connectivity_algo.cpp.
References CSM_PROPAGATE, and SearchClusters().
| const CN_CONNECTIVITY_ALGO::CLUSTERS CN_CONNECTIVITY_ALGO::SearchClusters | ( | CLUSTER_SEARCH_MODE | aMode, | 
| bool | aExcludeZones, | ||
| int | aSingleNet ) | 
Definition at line 324 of file connectivity_algo.cpp.
References CN_ITEM::ConnectedItems(), CSM_PROPAGATE, m_itemList, m_progressReporter, CN_ITEM::Net(), PCB_ZONE_T, Q, and searchConnections().
Referenced by FillIsolatedIslandsMap(), GetClusters(), PropagateNets(), and SearchClusters().
      
  | 
  private | 
Definition at line 229 of file connectivity_algo.cpp.
References GetKiCadThreadPool(), m_globalConnectivityData, m_isLocal, m_itemList, m_mutex, m_parentConnectivityData, m_progressReporter, PROF_TIMER::Show(), and tp.
Referenced by SearchClusters().
| void CN_CONNECTIVITY_ALGO::SetProgressReporter | ( | PROGRESS_REPORTER * | aReporter | ) | 
Definition at line 938 of file connectivity_algo.cpp.
References m_progressReporter.
      
  | 
  private | 
Definition at line 944 of file connectivity_algo.cpp.
References group, m_itemList, pad, and PCB_PAD_T.
Referenced by PropagateNets().
      
  | 
  private | 
Definition at line 331 of file connectivity_algo.h.
Referenced by Clear(), FillIsolatedIslandsMap(), propagateConnections(), and PropagateNets().
      
  | 
  private | 
Definition at line 333 of file connectivity_algo.h.
Referenced by ClearDirtyFlags(), GetDirtyClusters(), IsNetDirty(), MarkNetAsDirty(), and NetCount().
      
  | 
  private | 
Definition at line 336 of file connectivity_algo.h.
Referenced by LocalBuild(), and searchConnections().
      
  | 
  private | 
Definition at line 335 of file connectivity_algo.h.
Referenced by CN_CONNECTIVITY_ALGO(), LocalBuild(), and searchConnections().
      
  | 
  private | 
Definition at line 328 of file connectivity_algo.h.
Referenced by Add(), Build(), Clear(), ForEachAnchor(), ForEachItem(), ItemList(), Remove(), RemoveInvalidRefs(), SearchClusters(), searchConnections(), and updateJumperPads().
      
  | 
  private | 
Definition at line 329 of file connectivity_algo.h.
Referenced by Add(), add(), Build(), Clear(), ItemEntry(), ItemExists(), and Remove().
      
  | 
  private | 
Definition at line 338 of file connectivity_algo.h.
Referenced by searchConnections().
      
  | 
  private | 
Definition at line 327 of file connectivity_algo.h.
Referenced by CN_CONNECTIVITY_ALGO(), and searchConnections().
      
  | 
  private | 
Definition at line 340 of file connectivity_algo.h.
Referenced by FillIsolatedIslandsMap(), SearchClusters(), searchConnections(), and SetProgressReporter().
      
  | 
  private | 
Definition at line 332 of file connectivity_algo.h.
Referenced by Clear(), GetClusters(), and GetDirtyClusters().