Salome HOME
Degrees of freedom for a sketch (issue #796)
[modules/shaper.git] / src / SketchSolver / SolveSpaceSolver / SolveSpaceSolver_Solver.h
index c853970a34d43eb53025c67226357f489215e48f..b804217076fd3025c91ff38a7ec3737e6f81d087 100644 (file)
@@ -41,7 +41,7 @@ typedef unsigned int UINT32;
  */
 class SolveSpaceSolver_Solver : public SketchSolver_ISolver
 {
- public:
+public:
   SolveSpaceSolver_Solver();
   virtual ~SolveSpaceSolver_Solver();
 
@@ -74,8 +74,25 @@ class SolveSpaceSolver_Solver : public SketchSolver_ISolver
    */
   virtual SketchSolver_SolveStatus solve();
 
- private:
+  /// \brief Prepare for solving. Store initial values of parameters for undo
+  virtual void prepare();
+
+  /// \brief Revert solution to initial values
+  virtual void undo();
+
+  /// \brief Check the constraint is conflicted with others
+  virtual bool isConflicting(const ConstraintID& theConstraint) const;
+
+  /// \brief Degrees of freedom
+  virtual int dof() const;
+
+private:
+  /// \brief Check whether degenerated arcs exist
+  bool hasDegeneratedArcs() const;
+
+private:
   Slvs_System myEquationsSystem; ///< set of equations for solving in SolveSpace
+  Slvs_Param* myParamsCopy;      ///< copy of parameters
 };
 
 #endif