]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Storage.cpp
Salome HOME
Radius dimension does not change the circle (issue #1399)
[modules/shaper.git] / src / SketchSolver / SolveSpaceSolver / SolveSpaceSolver_Storage.cpp
index efbe1ad2de25721e7d63ef7a0544a995c2fb0ac7..e7b72775d3adbaa1a09a8fb8a8fa42287eeefef7 100644 (file)
@@ -59,8 +59,9 @@ bool SolveSpaceSolver_Storage::update(ConstraintWrapperPtr theConstraint)
     aSlvsConstr = aConstraint->constraint();
 
   // update value of constraint if exist
-  if (fabs(aSlvsConstr.valA - theConstraint->value()) > tolerance) {
-    aSlvsConstr.valA = theConstraint->value();
+  double aCoeff = aSlvsConstr.type == SLVS_C_DIAMETER ? 2.0 : 1.0;
+  if (fabs(aSlvsConstr.valA - theConstraint->value() * aCoeff) > tolerance) {
+    aSlvsConstr.valA = theConstraint->value() * aCoeff;
     isUpdated = true;
   }