diff --git a/pcbnew/drc/drc_test_provider_copper_clearance.cpp b/pcbnew/drc/drc_test_provider_copper_clearance.cpp index 974d3e9663..d78fc40d34 100644 --- a/pcbnew/drc/drc_test_provider_copper_clearance.cpp +++ b/pcbnew/drc/drc_test_provider_copper_clearance.cpp @@ -224,6 +224,7 @@ bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::Run() return true; } + static std::shared_ptr getShape( BOARD_ITEM* aItem, PCB_LAYER_ID aLayer ) { if( aItem->Type() == PCB_PAD_T && !static_cast( aItem )->FlashLayer( aLayer ) ) @@ -248,6 +249,15 @@ static std::shared_ptr getShape( BOARD_ITEM* aItem, PCB_LAYER_ID aLayer ) } +static bool isNetTie( BOARD_ITEM* aItem ) +{ + if( aItem->GetParent() && aItem->GetParent()->Type() == PCB_FOOTPRINT_T ) + return static_cast( aItem->GetParent() )->IsNetTie(); + + return false; +} + + bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::testTrackAgainstItem( TRACK* track, SHAPE* trackShape, PCB_LAYER_ID layer, BOARD_ITEM* other ) @@ -377,6 +387,11 @@ void DRC_TEST_PROVIDER_COPPER_CLEARANCE::testTrackClearances() if( other->HasFlag( SKIP_STRUCT ) ) return false; + // It would really be better to know what particular nets a nettie + // should allow, but for now it is what it is. + if( isNetTie( other ) ) + return false; + auto otherCItem = dynamic_cast( other ); if( otherCItem && otherCItem->GetNetCode() == track->GetNetCode() )