Improve arc construction using angles from arc geometry manager.

Fixes https://gitlab.com/kicad/code/kicad/issues/11713
This commit is contained in:
Alex 2022-10-07 06:50:50 +03:00
parent 2741d0eb4b
commit d26b59a0bf
1 changed files with 14 additions and 4 deletions

View File

@ -2136,10 +2136,20 @@ static void updateArcFromConstructionMgr( const KIGFX::PREVIEW::ARC_GEOM_MANAGER
aArc.SetCenter( vec ); aArc.SetCenter( vec );
vec = aMgr.GetStartRadiusEnd(); if( aMgr.GetSubtended() < ANGLE_0 )
aArc.SetStart( vec ); {
vec = aMgr.GetEndRadiusEnd(); vec = aMgr.GetStartRadiusEnd();
aArc.SetEnd( vec ); aArc.SetStart( vec );
vec = aMgr.GetEndRadiusEnd();
aArc.SetEnd( vec );
}
else
{
vec = aMgr.GetEndRadiusEnd();
aArc.SetStart( vec );
vec = aMgr.GetStartRadiusEnd();
aArc.SetEnd( vec );
}
} }