]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #2127: arc disappears after move
authorazv <azv@opencascade.com>
Tue, 11 Apr 2017 08:58:11 +0000 (11:58 +0300)
committerazv <azv@opencascade.com>
Tue, 11 Apr 2017 08:58:11 +0000 (11:58 +0300)
Remove temporary constraints if the solver failed and then recalculate set of constraints once again.

src/SketchSolver/SketchSolver_Group.cpp

index 0664550a29441c7802a3981dc0b998dc190369b6..bf0746fdb4f1cf6605e7decab077bc0be03b32ca 100644 (file)
@@ -167,6 +167,11 @@ bool SketchSolver_Group::resolveConstraints()
     try {
       if (!isGroupEmpty)
         aResult = mySketchSolver->solve();
+      if (aResult == PlaneGCSSolver_Solver::STATUS_FAILED &&
+          !myTempConstraints.empty()) {
+        removeTemporaryConstraints();
+        aResult = mySketchSolver->solve();
+      }
     } catch (...) {
       getWorkplane()->string(SketchPlugin_Sketch::SOLVER_ERROR())
         ->setValue(SketchSolver_Error::SOLVESPACE_CRASH());