Salome HOME
Issue #2074: Constraint on mirrored segment
authorazv <azv@opencascade.com>
Fri, 31 Mar 2017 08:18:58 +0000 (11:18 +0300)
committerazv <azv@opencascade.com>
Fri, 31 Mar 2017 08:18:58 +0000 (11:18 +0300)
Check list of conflicting constraint even if solver reports about Success calculation.

src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Solver.cpp

index 8d15b1680db393022809a9e08e96ea1495e2d321..47d783dcec8649e042feedd37b1847b16d686811 100644 (file)
@@ -87,13 +87,12 @@ PlaneGCSSolver_Solver::SolveStatus PlaneGCSSolver_Solver::solve()
   GCS::SolveStatus aResult = (GCS::SolveStatus)myEquationSystem->solve(myParameters);
   Events_LongOp::end(this);
 
-  GCS::VEC_I aRedundant;
-  myEquationSystem->getRedundant(aRedundant);
-  if (!aRedundant.empty()) {
-    collectConflicting();
-    if (!myConflictingIDs.empty())
-      aResult = GCS::Failed;
-  }
+  // collect information about conflicting constraints every time,
+  // sometimes solver reports about succeeded recalculation but has conflicting constraints
+  // (for example, apply horizontal constraint for a copied feature)
+  collectConflicting();
+  if (!myConflictingIDs.empty())
+    aResult = GCS::Failed;
 
   SolveStatus aStatus;
   if (aResult == GCS::Failed)