From d428b0e20ec9fefb47272698811abcac717d118b Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 24 Sep 2023 16:16:45 +0100 Subject: [PATCH] Improve SameLogicalPadAs() shorting nets test. This is required to support 4cd26ab6bcf804c79032462e991e08067d7018cb. --- pcbnew/drc/drc_test_provider_copper_clearance.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pcbnew/drc/drc_test_provider_copper_clearance.cpp b/pcbnew/drc/drc_test_provider_copper_clearance.cpp index dfb2763efc..63ea7c622f 100644 --- a/pcbnew/drc/drc_test_provider_copper_clearance.cpp +++ b/pcbnew/drc/drc_test_provider_copper_clearance.cpp @@ -774,12 +774,19 @@ bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::testPadAgainstItem( PAD* pad, SHAPE* pa if( otherPad && pad->SameLogicalPadAs( otherPad ) ) { // If pads are equivalent (ie: from the same footprint with the same pad number)... - // ... and have nets... + // ... and have "real" nets... // then they must be the same net - if( pad->GetNetCode() && otherPad->GetNetCode() - && pad->GetNetCode() != otherPad->GetNetCode() - && testShorting ) + if( testShorting ) { + if( pad->GetNetCode() == 0 || pad->GetNetCode() == otherPad->GetNetCode() ) + return !m_drcEngine->IsCancelled(); + + if( pad->GetShortNetname().StartsWith( wxS( "unconnected-(" ) ) + && otherPad->GetShortNetname().StartsWith( wxS( "unconnected-(" ) ) ) + { + return !m_drcEngine->IsCancelled(); + } + std::shared_ptr drce = DRC_ITEM::Create( DRCE_SHORTING_ITEMS ); wxString msg;