]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Incorrect conflict constraint in PlaneGCSSolver
authorazv <azv@opencascade.com>
Wed, 15 Jun 2016 08:26:45 +0000 (11:26 +0300)
committerazv <azv@opencascade.com>
Wed, 15 Jun 2016 08:28:11 +0000 (11:28 +0300)
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Solver.cpp

index 997bc1f4a2be19ea0abb3154990c180b7626006a..6cb6f40764c1fb6783d38bba736fe2b542c3f1e3 100644 (file)
@@ -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());