From 67c69ab77ee3483f3d805804a78815e98f010b5f Mon Sep 17 00:00:00 2001 From: azv Date: Wed, 31 Aug 2016 11:32:35 +0300 Subject: [PATCH] Fix reversing of the angle while executing dumped python script --- src/SketchPlugin/SketchPlugin_ConstraintAngle.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/SketchPlugin/SketchPlugin_ConstraintAngle.cpp b/src/SketchPlugin/SketchPlugin_ConstraintAngle.cpp index 2bf082f61..219f684ea 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintAngle.cpp +++ b/src/SketchPlugin/SketchPlugin_ConstraintAngle.cpp @@ -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); } -- 2.39.2