From d44a52ceee7a0e14b6a544f0032e8513ce7078ec Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 7 Oct 2022 08:35:07 +0300 Subject: [PATCH] Make arc endpoint theta consistent with polar coordinate system. --- common/preview_items/arc_assistant.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/common/preview_items/arc_assistant.cpp b/common/preview_items/arc_assistant.cpp index 00099248c1..f2e5d0ba40 100644 --- a/common/preview_items/arc_assistant.cpp +++ b/common/preview_items/arc_assistant.cpp @@ -103,15 +103,16 @@ void ARC_ASSISTANT::ViewDraw( int aLayer, KIGFX::VIEW* aView ) const EDA_ANGLE start = m_constructMan.GetStartAngle(); EDA_ANGLE subtended = m_constructMan.GetSubtended(); - EDA_ANGLE endAngle = start + subtended; + EDA_ANGLE normalizedEnd = ( start + subtended ).Normalize180(); // draw dimmed extender line to cursor preview_ctx.DrawLineWithAngleHighlight( origin, m_constructMan.GetLastPoint(), true ); cursorStrings.push_back( DimensionLabel( wxString::FromUTF8( "Δθ" ), subtended.AsDegrees(), m_iuScale, EDA_UNITS::DEGREES ) ); - cursorStrings.push_back( DimensionLabel( wxString::FromUTF8( "θ" ), endAngle.AsDegrees(), - m_iuScale, EDA_UNITS::DEGREES ) ); + cursorStrings.push_back( DimensionLabel( wxString::FromUTF8( "θ" ), + normalizedEnd.AsDegrees(), m_iuScale, + EDA_UNITS::DEGREES ) ); } // place the text next to cursor, on opposite side from radius