diff --git a/pcbnew/drc/drc_test_provider_zone_connections.cpp b/pcbnew/drc/drc_test_provider_zone_connections.cpp index 8658570439..7b70232898 100644 --- a/pcbnew/drc/drc_test_provider_zone_connections.cpp +++ b/pcbnew/drc/drc_test_provider_zone_connections.cpp @@ -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 ); diff --git a/pcbnew/tools/board_inspection_tool.cpp b/pcbnew/tools/board_inspection_tool.cpp index 7dd0d0320c..35a5de97c7 100644 --- a/pcbnew/tools/board_inspection_tool.cpp +++ b/pcbnew/tools/board_inspection_tool.cpp @@ -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 = 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 ) {