Allow pad-to-copper-graphic collisions in net-ties.

This is done under the same conditions as track-to-copper-graphic --
the pad or track must also collide with a net-tie pad, and the pad or
track to copper-graphic collision must be within the boundary of said
pad.

Fixes https://gitlab.com/kicad/code/kicad/issues/13008
This commit is contained in:
Jeff Young 2022-11-26 15:02:42 +00:00
parent 3f50199dad
commit 1e3186b9cb
1 changed files with 18 additions and 10 deletions

View File

@ -612,18 +612,26 @@ bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::testPadAgainstItem( PAD* pad, SHAPE* pa
if( padShape->Collide( otherShape.get(), std::max( 0, clearance - m_drcEpsilon ),
&actual, &pos ) )
{
std::shared_ptr<DRC_ITEM> drce = DRC_ITEM::Create( DRCE_CLEARANCE );
wxString msg = formatMsg( _( "(%s clearance %s; actual %s)" ),
constraint.GetName(),
clearance,
actual );
if( m_drcEngine->IsNetTieExclusion( pad->GetNetCode(), aLayer, pos, other ) )
{
// Pads connected to pads of a net-tie footprint are allowed to collide
// with the net-tie footprint's graphics.
}
else
{
std::shared_ptr<DRC_ITEM> drce = DRC_ITEM::Create( DRCE_CLEARANCE );
wxString msg = formatMsg( _( "(%s clearance %s; actual %s)" ),
constraint.GetName(),
clearance,
actual );
drce->SetErrorMessage( drce->GetErrorText() + wxS( " " ) + msg );
drce->SetItems( pad, other );
drce->SetViolatingRule( constraint.GetParentRule() );
drce->SetErrorMessage( drce->GetErrorText() + wxS( " " ) + msg );
drce->SetItems( pad, other );
drce->SetViolatingRule( constraint.GetParentRule() );
reportViolation( drce, pos, aLayer );
testHoles = false; // No need for multiple violations
reportViolation( drce, pos, aLayer );
testHoles = false; // No need for multiple violations
}
}
}
}