Salome HOME
The crash was fixed in SketchSolver on undo/redo operations
[modules/shaper.git] / src / SketchSolver / SketchSolver_ConstraintManager.h
index b833f54dc29fa701ff6e3e4046fa2ad320c92cd1..d49eb6ecffb76e7897b135330ccebb67dbbd6a66 100644 (file)
@@ -17,6 +17,7 @@
 #include <list>
 #include <map>
 #include <vector>
+#include <set>
 
 
 // Unknown constraint (for error reporting)
@@ -84,9 +85,8 @@ protected:
   void updateEntity(boost::shared_ptr<SketchPlugin_Feature> theFeature);
 
   /** \brief Goes through the list of groups and solve the constraints
-   *  \param[in] needEvent shows that some features are probably updated and Update event should be thrown
    */
-  void resolveConstraints(const bool needEvent);
+  void resolveConstraints();
 
 private:
   class SketchSolver_ConstraintGroup;
@@ -96,7 +96,7 @@ private:
    *  \param[out] theGroups     list of group indexes interacted with constraint
    */
   void findGroups(boost::shared_ptr<SketchPlugin_Constraint> theConstraint,
-                  std::vector<Slvs_hGroup>&                  theGroupIDs) const;
+                  std::set<Slvs_hGroup>&                     theGroupIDs) const;
 
   /** \brief Searches in the list of groups the workplane which constains specified constraint
    *  \param[in] theConstraint constraint to be found
@@ -166,6 +166,11 @@ public:
    */
   bool updateGroup();
 
+  /** \brief Add specified group to this one
+   *  \param[in] theGroup group of constraint to be added
+   */
+  void mergeGroups(const SketchSolver_ConstraintGroup& theGroup);
+
   /** \brief Start solution procedure if necessary and update attributes of features
    */
   void resolveConstraints();