Salome HOME
Pipe validator fix
[modules/shaper.git] / src / SketchSolver / SketchSolver_ISolver.h
index 75ddbfdf4d66a05d94b5f71f42b53f43437e3d91..fd992971a6759831b69f45124f5969daaab4643f 100644 (file)
@@ -16,7 +16,8 @@ enum SketchSolver_SolveStatus {
   STATUS_OK,
   STATUS_INCONSISTENT,
   STATUS_EMPTYSET,
-  STATUS_FAILED // set if no one other status is applicable
+  STATUS_FAILED, // set if no one other status is applicable
+  STATUS_UNKNOWN // set for newly created groups
 };
 
 
@@ -36,10 +37,19 @@ public:
   void calculateFailedConstraints(bool theSic)
   { myFindFaileds = theSic; }
 
+  /// \brief Prepare for solving. Store initial values of parameters for undo
+  virtual void prepare() = 0;
+
   /// \brief Solve the set of equations
   /// \return identifier whether solution succeeded
   virtual SketchSolver_SolveStatus solve() = 0;
 
+  /// \brief Revert solution to initial values
+  virtual void undo() = 0;
+
+  /// \brief Check the constraint is conflicted with others
+  virtual bool isConflicting(const ConstraintID& theConstraint) const = 0;
+
 protected:
   GroupID myGroup;       ///< ID of the group to be solved
   bool    myFindFaileds; ///< flag to find conflicting or inappropriate constraints