From 55d0b0ebb99d0c364bf5bb34f38b5978fa8e6c53 Mon Sep 17 00:00:00 2001 From: nds Date: Fri, 22 Apr 2016 08:54:57 +0300 Subject: [PATCH] Issue #1299, Issue #1393 Angle constraint: 2PI+ angle for case when angle is less than zero --- src/SketchPlugin/SketchPlugin_ConstraintAngle.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/SketchPlugin/SketchPlugin_ConstraintAngle.cpp b/src/SketchPlugin/SketchPlugin_ConstraintAngle.cpp index 27c35724d..3d402214f 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintAngle.cpp +++ b/src/SketchPlugin/SketchPlugin_ConstraintAngle.cpp @@ -194,8 +194,11 @@ double SketchPlugin_ConstraintAngle::getAngleForType(double theAngle) case SketcherPrs_Tools::ANGLE_DIRECT: anAngle = theAngle; break; - case SketcherPrs_Tools::ANGLE_COMPLEMENTARY: - anAngle = fabs(180.0 - theAngle); + case SketcherPrs_Tools::ANGLE_COMPLEMENTARY: { + anAngle = 180.0 - theAngle; + if (anAngle < 0) + anAngle += 360; + } break; case SketcherPrs_Tools::ANGLE_BACKWARD: anAngle = 360.0 - theAngle; -- 2.39.2