Salome HOME
Update calculation of angle value (issue #788)
[modules/shaper.git] / src / SketchSolver / SketchSolver_ConstraintAngle.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:    SketchSolver_ConstraintAngle.h
4 // Created: 24 August 2015
5 // Author:  Artem ZHIDKOV
6
7 #ifndef SketchSolver_ConstraintAngle_H_
8 #define SketchSolver_ConstraintAngle_H_
9
10 #include <SketchSolver_Constraint.h>
11
12 /** \class   SketchSolver_ConstraintAngle
13  *  \ingroup Plugins
14  *  \brief   Convert Agnle constraint to SolveSpace structure
15  */
16 class SketchSolver_ConstraintAngle : public SketchSolver_Constraint
17 {
18 public:
19   SketchSolver_ConstraintAngle(ConstraintPtr theConstraint) :
20       SketchSolver_Constraint(theConstraint),
21       myAngle(0.0)
22   {}
23
24   virtual int getType() const
25   { return SLVS_C_ANGLE; }
26
27   /// \brief This method is used in derived objects to check consistence of constraint.
28   virtual void adjustConstraint();
29
30 protected:
31   /// \brief Generate list of attributes of constraint in order useful for SolveSpace constraints
32   /// \param[out] theValue      numerical characteristic of constraint (e.g. distance)
33   /// \param[out] theAttributes list of attributes to be filled
34   virtual void getAttributes(double& theValue, std::vector<Slvs_hEntity>& theAttributes);
35
36 private:
37   double myAngle;
38 };
39
40 #endif