Make arc endpoint theta consistent with polar coordinate system.

This commit is contained in:
Alex 2022-10-07 08:35:07 +03:00
parent 165654f114
commit d44a52ceee
1 changed files with 4 additions and 3 deletions

View File

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