DRC checks need to be done on current layer.
Don't be fooled by the name "segment". It might be a via which is on multiple layers.... Fixes https://gitlab.com/kicad/code/kicad/issues/5503
This commit is contained in:
parent
0bd6e5d96e
commit
ec576b5dfa
|
@ -315,8 +315,7 @@ void DRC::doTrackDrc( BOARD_COMMIT& aCommit, TRACK* aRefSeg, TRACKS::iterator aS
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
minClearance = aRefSeg->GetClearance( aLayer, nullptr,
|
minClearance = aRefSeg->GetClearance( aLayer, nullptr, &m_clearanceSource );
|
||||||
&m_clearanceSource );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( pad->GetAttribute() == PAD_ATTRIB_STANDARD )
|
if( pad->GetAttribute() == PAD_ATTRIB_STANDARD )
|
||||||
|
@ -346,8 +345,7 @@ void DRC::doTrackDrc( BOARD_COMMIT& aCommit, TRACK* aRefSeg, TRACKS::iterator aS
|
||||||
if( !pad->IsPadOnLayer( aLayer ) )
|
if( !pad->IsPadOnLayer( aLayer ) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
int minClearance = aRefSeg->GetClearance( aRefSeg->GetLayer(), pad,
|
int minClearance = aRefSeg->GetClearance( aLayer, pad, &m_clearanceSource );
|
||||||
&m_clearanceSource );
|
|
||||||
int actual;
|
int actual;
|
||||||
|
|
||||||
if( pad->Collide( &refSeg, minClearance - bds.GetDRCEpsilon(), &actual ) )
|
if( pad->Collide( &refSeg, minClearance - bds.GetDRCEpsilon(), &actual ) )
|
||||||
|
@ -394,8 +392,7 @@ void DRC::doTrackDrc( BOARD_COMMIT& aCommit, TRACK* aRefSeg, TRACKS::iterator aS
|
||||||
if( !trackBB.Intersects( refSegBB ) )
|
if( !trackBB.Intersects( refSegBB ) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
int minClearance = aRefSeg->GetClearance( aRefSeg->GetLayer(), track,
|
int minClearance = aRefSeg->GetClearance( aLayer, track, &m_clearanceSource );
|
||||||
&m_clearanceSource );
|
|
||||||
int actual;
|
int actual;
|
||||||
SHAPE_SEGMENT trackSeg( track->GetStart(), track->GetEnd(), track->GetWidth() );
|
SHAPE_SEGMENT trackSeg( track->GetStart(), track->GetEnd(), track->GetWidth() );
|
||||||
|
|
||||||
|
@ -495,8 +492,7 @@ void DRC::doTrackDrc( BOARD_COMMIT& aCommit, TRACK* aRefSeg, TRACKS::iterator aS
|
||||||
dummyEdge.SetParent( m_pcb );
|
dummyEdge.SetParent( m_pcb );
|
||||||
dummyEdge.SetLayer( Edge_Cuts );
|
dummyEdge.SetLayer( Edge_Cuts );
|
||||||
|
|
||||||
aRefSeg->GetRuleClearance( &dummyEdge, aRefSeg->GetLayer(), &minClearance,
|
aRefSeg->GetRuleClearance( &dummyEdge, aLayer, &minClearance, &m_clearanceSource );
|
||||||
&m_clearanceSource );
|
|
||||||
|
|
||||||
int center2centerAllowed = minClearance + halfWidth - bds.GetDRCEpsilon();
|
int center2centerAllowed = minClearance + halfWidth - bds.GetDRCEpsilon();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue