7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-21 23:13:43 +00:00

Fix IsEffectiveLine calculation

We sometimes represent circles as 360° arcs.  These are approximately
colinear but are definitely not a line
This commit is contained in:
Seth Hillbrand 2025-03-06 12:44:13 -08:00
parent 57952a7a86
commit c24832f72b

View File

@ -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;
}