Salome HOME
Update unit tests for the PlaneGCS solver. Bug fixes.
[modules/shaper.git] / src / SketchSolver / SketchSolver_Storage.cpp
index e75992823848cbb6d47635c685004f1d7a6706a3..8370549174a16d7acc09de33e539a67599f88123 100644 (file)
@@ -652,6 +652,21 @@ void SketchSolver_Storage::blockEvents(bool isBlocked)
   myEventsBlocked = isBlocked;
 }
 
+std::set<ObjectPtr> SketchSolver_Storage::getConflictingConstraints(SolverPtr theSolver) const
+{
+  std::set<ObjectPtr> aConflicting;
+  std::map<ConstraintPtr, std::list<ConstraintWrapperPtr> >::const_iterator
+      aConstrIt = myConstraintMap.begin();
+  for (; aConstrIt != myConstraintMap.end(); ++aConstrIt) {
+    std::list<ConstraintWrapperPtr>::const_iterator anIt = aConstrIt->second.begin();
+    for (; anIt != aConstrIt->second.end(); ++anIt)
+      if (theSolver->isConflicting((*anIt)->id())) {
+        aConflicting.insert(aConstrIt->first);
+        break;
+      }
+  }
+  return aConflicting;
+}