Don't abort same-net items in the filter.

We still need to check for hole collisions.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21941

(cherry picked from commit d03b5f44ab)
This commit is contained in:
Jeff Young
2025-10-13 14:07:01 +01:00
parent 8a78d83087
commit 2b662b4ccc
@@ -1152,10 +1152,14 @@ void DRC_TEST_PROVIDER_COPPER_CLEARANCE::testGraphicClearances()
// Filter:
[&]( BOARD_ITEM* other ) -> bool
{
BOARD_CONNECTED_ITEM* otherCItem = dynamic_cast<BOARD_CONNECTED_ITEM*>( other );
if( otherCItem && otherCItem->GetNetCode() == aShape->GetNetCode() )
return false;
// Graphics are often compound shapes so ignore collisions between shapes
// in a single footprint.
if( aShape->Type() == PCB_SHAPE_T && other->Type() == PCB_SHAPE_T
&& aShape->GetParentFootprint()
&& aShape->GetParentFootprint() == other->GetParentFootprint() )
{
return false;
}
// Track clearances are tested in testTrackClearances()
if( dynamic_cast<PCB_TRACK*>( other) )
@@ -1215,6 +1219,9 @@ void DRC_TEST_PROVIDER_COPPER_CLEARANCE::testGraphicClearances()
{
testGraphicAgainstZone( item );
if( item->Type() == PCB_SHAPE_T && item->IsOnCopperLayer() )
testCopperGraphic( static_cast<PCB_SHAPE*>( item ) );
done.fetch_add( 1 );
if( m_drcEngine->IsCancelled() )