From: azv Date: Thu, 1 Sep 2016 05:16:35 +0000 (+0300) Subject: Fix for complementary angle constraint (incorrect calculation of direct angle) X-Git-Tag: V_2.5.0~90 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e49ce1df4ed0e4e95c80ebb2216d71f926f7d606;p=modules%2Fshaper.git Fix for complementary angle constraint (incorrect calculation of direct angle) --- diff --git a/src/SketchPlugin/SketchPlugin_ConstraintAngle.cpp b/src/SketchPlugin/SketchPlugin_ConstraintAngle.cpp index 219f684ea..65ac80b15 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintAngle.cpp +++ b/src/SketchPlugin/SketchPlugin_ConstraintAngle.cpp @@ -228,8 +228,9 @@ 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())); - bool isObtuse = aValueAttr->isInitialized() && aValueAttr->value() > 180.0; - anAngle = getAngleForType(anAngle, isObtuse); + if (!aValueAttr->isInitialized()) + calculateAngle(); + anAngle = getAngleForType(anAngle, aValueAttr->value() > 180.0); aValueAttr->setValue(anAngle); } diff --git a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp index 2b83759b8..6619c372b 100644 --- a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp +++ b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp @@ -428,8 +428,8 @@ void PlaneGCSSolver_Storage::processArc(const EntityWrapperPtr& theArc) *aEndAngle += anAngle; } - // no need to constraint a fixed or a copied arc - if (theArc->group() == GID_OUTOFGROUP || anArcFeature->isCopy()) + // no need to constraint a copied arc + if (anArcFeature->isCopy()) return; // No need to add constraints if they are already exist std::map >::const_iterator