From 5605f5ffcd3255b11594ad7f45fe1d0fce5f31d3 Mon Sep 17 00:00:00 2001 From: azv Date: Tue, 11 Apr 2017 11:58:11 +0300 Subject: [PATCH] Issue #2127: arc disappears after move Remove temporary constraints if the solver failed and then recalculate set of constraints once again. --- src/SketchSolver/SketchSolver_Group.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/SketchSolver/SketchSolver_Group.cpp b/src/SketchSolver/SketchSolver_Group.cpp index 0664550a2..bf0746fdb 100644 --- a/src/SketchSolver/SketchSolver_Group.cpp +++ b/src/SketchSolver/SketchSolver_Group.cpp @@ -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()); -- 2.39.2