X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchSolver%2FSketchSolver_Solver.h;h=f90d71fd2f816d3f66f38e41585137e8324eb645;hb=e9ddcb81ff60a32b1b0dffbff65bbd92f6ce9b6e;hp=fd2e5213256f245e86d72ee6d8e6c9aa798eefd8;hpb=38afbd899a8645c83e17f2c24a17a2b7414911b4;p=modules%2Fshaper.git diff --git a/src/SketchSolver/SketchSolver_Solver.h b/src/SketchSolver/SketchSolver_Solver.h index fd2e52132..f90d71fd2 100644 --- a/src/SketchSolver/SketchSolver_Solver.h +++ b/src/SketchSolver/SketchSolver_Solver.h @@ -24,9 +24,20 @@ typedef unsigned int UINT32; // Unknown constraint (for error reporting) #define SLVS_C_UNKNOWN 0 +// Fillet constraint identifier +#define SLVS_C_FILLET 100100 +// Multi-rotation constraint identifier +#define SLVS_C_MULTI_ROTATION 100101 +// Multi-translation constraint identifier +#define SLVS_C_MULTI_TRANSLATION 100102 // Unknown entity #define SLVS_E_UNKNOWN 0 +// Unknown group +#define SLVS_G_UNKNOWN 0 +/** + * The main class that performs the high-level operations for connection to the SolveSpace. + */ class SketchSolver_Solver { public: @@ -41,25 +52,33 @@ class SketchSolver_Solver } /** \brief Change array of parameters - * \param[in] theParameters vector of parameters + * \param[in] theParameters pointer to the array of parameters + * \param[in] theSize size of this array */ - void setParameters(const std::vector& theParameters); + void setParameters(Slvs_Param* theParameters, int theSize); /** \brief Change array of entities - * \param[in] theEntities vector of entities + * \param[in] theEntities pointer to the array of entities + * \param[in] theSize size of this array */ - void setEntities(const std::vector& theEntities); + void setEntities(Slvs_Entity* theEntities, int theSize); /** \brief Change array of constraints - * \param[in] theConstraints vector of constraints + * \param[in] theConstraints pointer to the array of constraints + * \param[in] theSize size of this array */ - void setConstraints(const std::vector& theConstraints); + void setConstraints(Slvs_Constraint* theConstraints, int theSize); /** \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); + void setDraggedParameters(const Slvs_hParam* theDragged); + + /** \brief Set or unset the flag which allows to find all failed constraints + */ + void calculateFailedConstraints(bool theSic) + { myEquationsSystem.calculateFaileds = theSic ? 1 : 0; } /** \brief Solve the set of equations * \return identifier whether solution succeeded