Use true arc collision for segment<>arc

Using an approximation here results in different collision
results for segment<>arc than point<>arc, which
can cause odd behavior in the router.


(cherry picked from commit 5b3b0ff836)

Co-authored-by: Jon Evans <jon@craftyjon.com>
This commit is contained in:
Jon Evans 2024-05-23 12:58:01 +00:00
parent dc08cf3252
commit cecc1a2ff1
1 changed files with 2 additions and 3 deletions

View File

@ -651,9 +651,8 @@ static inline bool Collide( const SHAPE_ARC& aA, const SHAPE_SEGMENT& aB, int aC
aA.TypeName(),
aB.TypeName() ) );
const SHAPE_LINE_CHAIN lc( aA );
bool rv = Collide( lc, aB, aClearance + aA.GetWidth() / 2, aActual, aLocation, aMTV );
bool rv = aA.Collide( aB.GetSeg(), aClearance + aA.GetWidth() / 2 + aB.GetWidth() / 2,
aActual, aLocation );
if( rv && aActual )
*aActual = std::max( 0, *aActual - aA.GetWidth() / 2 );