router: fix another corner case in LINE::Walkaround() (duplicated vertex triggered by feeding a closed loop as the input path)
fixes: 1775
This commit is contained in:
parent
2b955437b6
commit
dfd80e077c
|
@ -234,7 +234,10 @@ bool LINE::Walkaround( const SHAPE_LINE_CHAIN& aObstacle, SHAPE_LINE_CHAIN& aPat
|
|||
// corner case for loopy tracks: insert the end loop point back into the hull
|
||||
if( auto isect = pnew.SelfIntersecting() )
|
||||
{
|
||||
pnew.Split( isect->p );
|
||||
if( isect->p != pnew.CPoint( -1 ) )
|
||||
{
|
||||
pnew.Split( isect->p );
|
||||
}
|
||||
}
|
||||
|
||||
// insert all intersections found into the new hull/path SLCs
|
||||
|
|
Loading…
Reference in New Issue