Salome HOME
Improve updating "Multi" constraints
[modules/shaper.git] / src / SketchSolver / SketchSolver_Group.h
index 7e8c9424f1f55e91119f53c2c8fb17d491aa95d6..fa590266467fe289621e49dd605838b8ab64ae7d 100644 (file)
@@ -37,7 +37,7 @@ class SketchSolver_Group
   /// \brief Returns true if the group has no constraints yet
   inline bool isEmpty() const
   {
-    return myConstraints.empty();
+    return myConstraints.empty() && myTempConstraints.empty();
   }
 
   /// \brief Check for valid sketch data
@@ -84,6 +84,9 @@ class SketchSolver_Group
   void blockEvents(bool isBlocked);
 
 private:
+  /// \biref Verify constraints have not been removed
+  bool areConstraintsValid() const;
+
   /** \brief Removes constraints from the group
    *  \param[in] theConstraint constraint to be removed
    */
@@ -96,7 +99,7 @@ private:
   void setTemporary(SolverConstraintPtr theConstraint);
 
   /// \brief Compute DoF of the sketch and set corresponding field
-  void computeDoF() const;
+  void computeDoF();
 
 private:
   CompositeFeaturePtr mySketch; ///< Sketch for this group
@@ -110,7 +113,11 @@ private:
   PlaneGCSSolver_Solver::SolveStatus myPrevResult;
   std::set<ObjectPtr>      myConflictingConstraints; ///< List of conflicting constraints
 
+  int  myDOF; ///< degrees of freedom of the current sketch
+
   bool myIsEventsBlocked; ///< shows the events are blocked for this group
+
+  int myMultiConstraintUpdateStack; ///< depth of the stack updating "Multi" constraints
 };
 
 typedef std::shared_ptr<SketchSolver_Group> SketchGroupPtr;