55 virtual bool Run()
override;
57 virtual const wxString
GetName()
const override
59 return wxT(
"connectivity" );
64 return wxT(
"Tests board connectivity" );
71 if( !
reportPhase(
_(
"Checking pad, via and zone connections..." ) ) )
76 std::shared_ptr<CONNECTIVITY_DATA> connectivity = board->
GetConnectivity();
77 std::vector<CN_ZONE_ISOLATED_ISLAND_LIST> islandsList;
81 if( !zone->GetIsRuleArea() )
86 connectivity->ClearRatsnest();
88 connectivity->FindIsolatedCopperIslands( islandsList,
true );
90 int progressDelta = 250;
92 int count = board->
Tracks().size() + islandsList.size();
102 if( exceedV && exceedT )
104 else if( track->Type() ==
PCB_VIA_T && exceedV )
116 if( connectivity->TestTrackEndpointDangling( track, &pos ) )
119 drcItem->SetItems( track );
133 for(
PCB_LAYER_ID layer : zone.m_zone->GetLayerSet().Seq() )
135 if( !zone.m_islands.count( layer ) )
138 std::shared_ptr<SHAPE_POLY_SET> poly = zone.m_zone->GetFilledPolysList( layer );
140 for(
int idx : zone.m_islands.at( layer ) )
146 drcItem->SetItems( zone.m_zone );
155 if( !
reportPhase(
_(
"Checking net connections..." ) ) )
159 count = connectivity->GetUnconnectedCount(
false );
161 connectivity->RunOnUnconnectedEdges(
Information pertinent to a Pcbnew printed circuit board.
std::shared_ptr< CONNECTIVITY_DATA > GetConnectivity() const
Return a list of missing connections between components/tracks.
CN_EDGE represents a point-to-point connection, whether realized or unrealized (ie: tracks etc.
std::shared_ptr< const CN_ANCHOR > GetSourceNode() const
std::shared_ptr< const CN_ANCHOR > GetTargetNode() const
bool IsErrorLimitExceeded(int error_code)
PROGRESS_REPORTER * GetProgressReporter() const
static std::shared_ptr< DRC_ITEM > Create(int aErrorCode)
Constructs a DRC_ITEM for the given error code.
virtual bool Run() override
Run this provider against the given PCB with configured options (if any).
virtual ~DRC_TEST_PROVIDER_CONNECTIVITY()
virtual const wxString GetName() const override
DRC_TEST_PROVIDER_CONNECTIVITY()
virtual const wxString GetDescription() const override
Represent a DRC "provider" which runs some DRC functions over a BOARD and spits out #DRC_ITEMs and po...
virtual bool reportPhase(const wxString &aStageName)
virtual bool reportProgress(int aCount, int aSize, int aDelta)
virtual void reportViolation(std::shared_ptr< DRC_ITEM > &item, const VECTOR2I &aMarkerPos, int aMarkerLayer)
virtual void reportRuleStatistics()
Handle a list of polygons defining a copper zone.
PCB_LAYER_ID
A quick note on layer IDs:
static DRC_REGISTER_TEST_PROVIDER< DRC_TEST_PROVIDER_ANNULAR_WIDTH > dummy
A structure used for calculating isolated islands on a given zone across all its layers.
@ PCB_VIA_T
class PCB_VIA, a via (like a track segment on a copper layer)
@ PCB_TRACE_T
class PCB_TRACK, a track segment (segment on a copper layer)