Salome HOME
Several improvements mostly for automatic update of result
[modules/shaper.git] / src / SketchSolver / SketchSolver_Solver.h
index aeb29ef5e44d5753a5febc9cad8baf999f8e97ea..8a4f9964e95a7795389fc3563c538b99a22c91d2 100644 (file)
@@ -10,6 +10,8 @@
 // Need to be defined before including SolveSpace to avoid additional dependances on Windows platform
 #if defined(WIN32) && !defined(HAVE_C99_INTEGER_TYPES)
 typedef unsigned int UINT32;
+#else
+#include <stdint.h>
 #endif
 #include <string.h>
 #include <slvs.h>
@@ -19,6 +21,11 @@ typedef unsigned int UINT32;
 
 #define SLVS_RESULT_EMPTY_SET -1
 
+// Unknown constraint (for error reporting)
+#define SLVS_C_UNKNOWN 0
+// Unknown entity
+#define SLVS_E_UNKNOWN 0
+
 
 class SketchSolver_Solver
 {
@@ -46,6 +53,12 @@ public:
    */
   void setConstraints(const std::vector<Slvs_Constraint>& theConstraints);
 
+  /** \brief Store the parameters of the point which was moved by user.
+   *         The solver will watch this items to be constant
+   *  \param[in] theDragged list of parameters (not more than 4) which should not be changed during solving
+   */
+  void setDraggedParameters(const std::vector<Slvs_hParam>& theDragged);
+
   /** \brief Solve the set of equations
    *  \return identifier whether solution succeeded
    */