Only clean up tracks completely inside pads.
Fixes https://gitlab.com/kicad/code/kicad/issues/5093
This commit is contained in:
parent
76bd344730
commit
ea1be41ff0
|
@ -329,6 +329,13 @@ void TRACKS_CLEANER::deleteTracksInPads()
|
|||
for( D_PAD* pad : connectivity->GetConnectedPads( track ) )
|
||||
{
|
||||
if( pad->HitTest( track->GetStart() ) && pad->HitTest( track->GetEnd() ) )
|
||||
{
|
||||
SHAPE_POLY_SET poly;
|
||||
track->TransformShapeWithClearanceToPolygon( poly, 0 );
|
||||
|
||||
poly.BooleanSubtract( *pad->GetEffectivePolygon(), SHAPE_POLY_SET::PM_FAST );
|
||||
|
||||
if( poly.IsEmpty() )
|
||||
{
|
||||
CLEANUP_ITEM* item = new CLEANUP_ITEM( CLEANUP_TRACK_IN_PAD );
|
||||
item->SetItems( track );
|
||||
|
@ -338,6 +345,7 @@ void TRACKS_CLEANER::deleteTracksInPads()
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( !m_dryRun )
|
||||
removeItems( toRemove );
|
||||
|
|
Loading…
Reference in New Issue