]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix reversing of the angle while executing dumped python script
authorazv <azv@opencascade.com>
Wed, 31 Aug 2016 08:32:35 +0000 (11:32 +0300)
committerazv <azv@opencascade.com>
Wed, 31 Aug 2016 08:33:09 +0000 (11:33 +0300)
src/SketchPlugin/SketchPlugin_ConstraintAngle.cpp

index 2bf082f6145f721c1805406b3766aaeae2b5e009..219f684ea2aeca6220f056803d81620050890507 100644 (file)
@@ -228,7 +228,8 @@ void SketchPlugin_ConstraintAngle::updateConstraintValueByAngleValue()
   /// an angle value should be corrected by the current angle type
   aValueAttr = std::dynamic_pointer_cast<
                   ModelAPI_AttributeDouble>(data()->attribute(SketchPlugin_Constraint::VALUE()));
-  anAngle = getAngleForType(anAngle, aValueAttr->value() > 180.0);
+  bool isObtuse = aValueAttr->isInitialized() && aValueAttr->value() > 180.0;
+  anAngle = getAngleForType(anAngle, isObtuse);
   aValueAttr->setValue(anAngle);
 }