From: azv Date: Wed, 15 Jun 2016 08:26:45 +0000 (+0300) Subject: Incorrect conflict constraint in PlaneGCSSolver X-Git-Tag: V_2.4.0~109 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4cdce5facd9c93a530aa6eda7bd814754b538048;p=modules%2Fshaper.git Incorrect conflict constraint in PlaneGCSSolver --- diff --git a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Solver.cpp b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Solver.cpp index 997bc1f4a..6cb6f4076 100644 --- a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Solver.cpp +++ b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Solver.cpp @@ -70,7 +70,7 @@ SketchSolver_SolveStatus PlaneGCSSolver_Solver::solve() for (; aPIt != aParams.end(); ++aPIt) if (aParameters.find(*aPIt) != aParameters.end()) break; - if (aPIt == aParams.end()) { + if (aPIt == aParams.end() && (*aConstrIt)->getTag() > 0) { myConflictingIDs.push_back((*aConstrIt)->getTag()); myConfCollected = true; aResult = GCS::Failed; @@ -106,7 +106,7 @@ SketchSolver_SolveStatus PlaneGCSSolver_Solver::solveWithoutTangent() // Remove tangency which leads to redundant or conflicting constraints GCS::VEC_I aConflicting, aRedundant; myEquationSystem.getRedundant(aRedundant); - size_t aNbRemove = aRedundant.size(); // number of tangent constraints which can be removed + size_t aNbRemove = myTangent.size(); // number of tangent constraints which can be removed myEquationSystem.getConflicting(aConflicting); aRedundant.insert(aRedundant.end(), aConflicting.begin(), aConflicting.end());