Only run starved-thermals checks when pad is actually connected to zone.
Fixes https://gitlab.com/kicad/code/kicad/issues/10583
This commit is contained in:
parent
53cf899b67
commit
c8d14ade65
|
@ -106,15 +106,14 @@ bool DRC_TEST_PROVIDER_ZONE_CONNECTIONS::Run()
|
|||
if( m_drcEngine->IsErrorLimitExceeded( DRCE_STARVED_THERMAL ) )
|
||||
return true;
|
||||
|
||||
if( !pad->FlashLayer( layer ) )
|
||||
continue;
|
||||
|
||||
// Quick test for connected:
|
||||
if( pad->GetNetCode() != zone->GetNetCode() || pad->GetNetCode() <= 0 )
|
||||
continue;
|
||||
|
||||
EDA_RECT item_boundingbox = pad->GetBoundingBox();
|
||||
// More thorough test for connected:
|
||||
const KICAD_T type_zone[] = { PCB_ZONE_T, EOT };
|
||||
|
||||
if( !item_boundingbox.Intersects( zone->GetCachedBoundingBox() ) )
|
||||
if( !alg::contains( connectivity->GetConnectedItems( pad, type_zone ), zone ) )
|
||||
continue;
|
||||
|
||||
constraint = bds.m_DRCEngine->EvalZoneConnection( pad, zone, layer );
|
||||
|
|
|
@ -409,12 +409,25 @@ int BOARD_INSPECTION_TOOL::InspectClearance( const TOOL_EVENT& aEvent )
|
|||
constraint = drcEngine.EvalRules( THERMAL_SPOKE_WIDTH_CONSTRAINT, pad, zone, layer, r );
|
||||
int width = constraint.m_Value.Opt();
|
||||
|
||||
r->Report( "" );
|
||||
r->Report( wxString::Format( _( "Resolved thermal spoke width: %s." ),
|
||||
StringFromValue( units, width, true ) ) );
|
||||
|
||||
constraint = drcEngine.EvalRules( MIN_RESOLVED_SPOKES_CONSTRAINT, pad, zone, layer, r );
|
||||
int minSpokes = constraint.m_Value.Min();
|
||||
|
||||
if( compileError )
|
||||
reportCompileError( r );
|
||||
|
||||
r->Report( "" );
|
||||
r->Report( wxString::Format( _( "Resolved thermal spoke width: %s." ),
|
||||
r->Report( wxString::Format( _( "Minimum thermal spoke count: %s." ),
|
||||
StringFromValue( units, width, true ) ) );
|
||||
|
||||
std::shared_ptr<CONNECTIVITY_DATA> connectivity = pad->GetBoard()->GetConnectivity();
|
||||
const KICAD_T zones[] = { PCB_ZONE_T, EOT };
|
||||
|
||||
if( !alg::contains( connectivity->GetConnectedItems( pad, zones ), zone ) )
|
||||
r->Report( _( "Items are not connected. No thermal spokes will be generated." ) );
|
||||
}
|
||||
else if( constraint.m_ZoneConnection == ZONE_CONNECTION::NONE )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue