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.
This commit is contained in:
Jon Evans 2024-05-23 08:55:56 -04:00
parent 795a9eea60
commit 5b3b0ff836
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 );