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:
parent
3f50199dad
commit
1e3186b9cb
|
@ -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 ),
|
if( padShape->Collide( otherShape.get(), std::max( 0, clearance - m_drcEpsilon ),
|
||||||
&actual, &pos ) )
|
&actual, &pos ) )
|
||||||
{
|
{
|
||||||
std::shared_ptr<DRC_ITEM> drce = DRC_ITEM::Create( DRCE_CLEARANCE );
|
if( m_drcEngine->IsNetTieExclusion( pad->GetNetCode(), aLayer, pos, other ) )
|
||||||
wxString msg = formatMsg( _( "(%s clearance %s; actual %s)" ),
|
{
|
||||||
constraint.GetName(),
|
// Pads connected to pads of a net-tie footprint are allowed to collide
|
||||||
clearance,
|
// with the net-tie footprint's graphics.
|
||||||
actual );
|
}
|
||||||
|
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->SetErrorMessage( drce->GetErrorText() + wxS( " " ) + msg );
|
||||||
drce->SetItems( pad, other );
|
drce->SetItems( pad, other );
|
||||||
drce->SetViolatingRule( constraint.GetParentRule() );
|
drce->SetViolatingRule( constraint.GetParentRule() );
|
||||||
|
|
||||||
reportViolation( drce, pos, aLayer );
|
reportViolation( drce, pos, aLayer );
|
||||||
testHoles = false; // No need for multiple violations
|
testHoles = false; // No need for multiple violations
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue