X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchSolver%2FSketchSolver_Solver.h;h=7079f1598549d2660c1c15102dce44a84a18bba4;hb=9c54fb01877c455abb5b5ff22e384468f795b328;hp=19408410a35415e49fc297d9db20873e5efb035a;hpb=75998600f27bd4cb25348d871627b313f95fcf35;p=modules%2Fshaper.git diff --git a/src/SketchSolver/SketchSolver_Solver.h b/src/SketchSolver/SketchSolver_Solver.h index 19408410a..7079f1598 100644 --- a/src/SketchSolver/SketchSolver_Solver.h +++ b/src/SketchSolver/SketchSolver_Solver.h @@ -1,9 +1,11 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + // File: SketchSolver_Solver.h // Created: 07 May 2014 // Author: Artem ZHIDKOV -#ifndef SketchSolver_Solver_Headerfile -#define SketchSolver_Solver_Headerfile +#ifndef SketchSolver_Solver_H_ +#define SketchSolver_Solver_H_ #include "SketchSolver.h" @@ -18,7 +20,6 @@ typedef unsigned int UINT32; #include - #define SLVS_RESULT_EMPTY_SET -1 // Unknown constraint (for error reporting) @@ -26,17 +27,21 @@ typedef unsigned int UINT32; // Unknown entity #define SLVS_E_UNKNOWN 0 - +/** + * The main class that performs the high-level operations for connection to the SolveSpace. + */ class SketchSolver_Solver { -public: + public: SketchSolver_Solver(); ~SketchSolver_Solver(); /** \brief Initialize the ID of the group */ inline void setGroupID(Slvs_hGroup theGroupID) - { myGroupID = theGroupID; } + { + myGroupID = theGroupID; + } /** \brief Change array of parameters * \param[in] theParameters vector of parameters @@ -53,6 +58,12 @@ public: */ void setConstraints(const std::vector& 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& theDragged); + /** \brief Solve the set of equations * \return identifier whether solution succeeded */ @@ -64,9 +75,9 @@ public: */ bool getResult(std::vector& theParameters); -private: + private: Slvs_hGroup myGroupID; ///< identifier of the group to be solved - Slvs_System myEquationsSystem; ///< set of equations for solving in SolveSpace + Slvs_System myEquationsSystem; ///< set of equations for solving in SolveSpace }; #endif