]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #1299, Issue #1393 Angle constraint: 2PI+ angle for case when angle is less...
authornds <nds@opencascade.com>
Fri, 22 Apr 2016 05:54:57 +0000 (08:54 +0300)
committernds <nds@opencascade.com>
Fri, 22 Apr 2016 05:54:57 +0000 (08:54 +0300)
src/SketchPlugin/SketchPlugin_ConstraintAngle.cpp

index 27c35724d94065a1863cb6422c255ea1d8bc3a4f..3d402214f7b48fa2583e8e1686482ee0f6c9f9b0 100644 (file)
@@ -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;