mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-19 23:21:41 +00:00
Dogbone: handle small mouths even better
Including floating point roundoff, which can bite for rectangles.
This commit is contained in:
parent
671ecdf13c
commit
a5e6f70122
@ -207,7 +207,8 @@ std::optional<DOGBONE_RESULT> ComputeDogbone( const SEG& aSegA, const SEG& aSegB
|
||||
if( aOtherPtB != *ptOnSegB )
|
||||
new_b = SEG{ aOtherPtB, *ptOnSegB };
|
||||
|
||||
const bool small_arc_mouth = arc.GetCentralAngle() > ANGLE_270;
|
||||
const EDA_ANGLE epsilon( 1e-5, EDA_ANGLE_T::DEGREES_T );
|
||||
const bool small_arc_mouth = arc.GetCentralAngle().Normalize() > ( ANGLE_180 + epsilon );
|
||||
|
||||
return DOGBONE_RESULT{
|
||||
arc, new_a, new_b, small_arc_mouth,
|
||||
|
Loading…
Reference in New Issue
Block a user