]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Show conflicting constraints when fixing constrained entity
authorazv <azv@opencascade.com>
Fri, 10 Jun 2016 05:51:14 +0000 (08:51 +0300)
committerazv <azv@opencascade.com>
Fri, 10 Jun 2016 05:51:14 +0000 (08:51 +0300)
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Solver.cpp
src/SketchSolver/SketchSolver_ConstraintFixed.cpp

index 97edb3194f29313472965934203bb0b9ea2d74bc..997bc1f4a2be19ea0abb3154990c180b7626006a 100644 (file)
@@ -71,6 +71,8 @@ SketchSolver_SolveStatus PlaneGCSSolver_Solver::solve()
       if (aParameters.find(*aPIt) != aParameters.end())
         break;
     if (aPIt == aParams.end()) {
+      myConflictingIDs.push_back((*aConstrIt)->getTag());
+      myConfCollected = true;
       aResult = GCS::Failed;
     }
   }
@@ -148,11 +150,12 @@ bool PlaneGCSSolver_Solver::isConflicting(const ConstraintID& theConstraint) con
 
 void PlaneGCSSolver_Solver::collectConflicting()
 {
+  GCS::VEC_I aConflict;
   myEquationSystem.getConflicting(myConflictingIDs);
+  myConflictingIDs.insert(myConflictingIDs.end(), aConflict.begin(), aConflict.end());
 
-  GCS::VEC_I aRedundantID;
-  myEquationSystem.getRedundant(aRedundantID);
-  myConflictingIDs.insert(myConflictingIDs.end(), aRedundantID.begin(), aRedundantID.end());
+  myEquationSystem.getRedundant(aConflict);
+  myConflictingIDs.insert(myConflictingIDs.end(), aConflict.begin(), aConflict.end());
 
   myConfCollected = true;
 }
index 13c2fa50dc47e3dc377e92f84dc4b78bb969c926..c048a85287324e3010c904ca5bf8757179b67793 100644 (file)
@@ -107,6 +107,7 @@ bool SketchSolver_ConstraintFixed::remove()
   }
   if (aFeature)
     myStorage->update(aFeature, myGroupID);
+  myStorage->setNeedToResolve(true);
 
   // Remove constraint or base feature
   if (myBaseConstraint) {