From: nds Date: Fri, 22 Apr 2016 05:54:57 +0000 (+0300) Subject: Issue #1299, Issue #1393 Angle constraint: 2PI+ angle for case when angle is less... X-Git-Tag: V_2.3.0~144 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=55d0b0ebb99d0c364bf5bb34f38b5978fa8e6c53;p=modules%2Fshaper.git Issue #1299, Issue #1393 Angle constraint: 2PI+ angle for case when angle is less than zero --- 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;