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:
Tomasz Wlostowski 2021-05-31 00:17:08 +02:00
parent 2b955437b6
commit dfd80e077c
1 changed files with 4 additions and 1 deletions

View File

@ -233,9 +233,12 @@ 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() )
{
if( isect->p != pnew.CPoint( -1 ) )
{
pnew.Split( isect->p );
}
}
// insert all intersections found into the new hull/path SLCs
for( auto& ip : ips )