Fix bad clearance logic in cecc1a2f

(cherry picked from commit a1cd73e730)

Co-authored-by: Jon Evans <jon@craftyjon.com>
This commit is contained in:
Jon Evans 2024-05-23 15:21:40 +00:00
parent 3f4c82b39b
commit 81efc7778a
1 changed files with 2 additions and 3 deletions

View File

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