Browse Source

Fix IsEffectiveLine calculation

We sometimes represent circles as 360° arcs.  These are approximately
colinear but are definitely not a line
revert-0c36e162
Seth Hillbrand 8 months ago
parent
commit
c24832f72b
  1. 2
      libs/kimath/src/geometry/shape_arc.cpp

2
libs/kimath/src/geometry/shape_arc.cpp

@ -247,7 +247,7 @@ bool SHAPE_ARC::IsEffectiveLine() const
SEG v1 = SEG( m_start, m_mid );
SEG v2 = SEG( m_mid, m_end );
return v1.ApproxCollinear( v2 );
return v1.ApproxCollinear( v2 ) && (v1.B - v1.A).Dot(v2.B - v2.A) > 0;
}

Loading…
Cancel
Save