Salome HOME
Add tools
[modules/shaper.git] / src / SketchSolver / SketchSolver_ConstraintFillet.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:    SketchSolver_ConstraintFillet.h
4 // Created: 1 Apr 2015
5 // Author:  Artem ZHIDKOV
6
7 #ifndef SketchSolver_ConstraintFillet_H_
8 #define SketchSolver_ConstraintFillet_H_
9
10 #include "SketchSolver.h"
11 #include <SketchSolver_Constraint.h>
12
13 /** \class   SketchSolver_ConstraintFillet
14  *  \ingroup Plugins
15  *  \brief   Convert fillet constraint to SolveSpace structure
16  */
17 class SketchSolver_ConstraintFillet : public SketchSolver_Constraint
18 {
19 public:
20   /// Constructor based on SketchPlugin constraint
21   SketchSolver_ConstraintFillet(ConstraintPtr theConstraint) :
22       SketchSolver_Constraint(theConstraint)
23   {}
24
25   virtual int getType() const
26   { return SLVS_C_FILLET; }
27
28   /// \brief Tries to remove constraint
29   /// \return \c false, if current constraint contains another SketchPlugin constraints (like for multiple coincidence)
30   virtual bool remove(ConstraintPtr theConstraint = ConstraintPtr());
31
32 protected:
33   /// \brief Converts SketchPlugin constraint to a list of SolveSpace constraints
34   virtual void process();
35
36   /// \brief Generate list of attributes of constraint in order useful for SolveSpace constraints
37   /// \param[out] theValue      numerical characteristic of constraint (e.g. distance)
38   /// \param[out] theAttributes list of attributes to be filled
39   ///
40   /// Parameter theAttributes contains 5 elements:
41   /// Two first entities in theAttributes list correspond to base features of fillet,
42   /// the next two entities represent trimmed base features and the last one is a fillet arc.
43   virtual void getAttributes(double& theValue, std::vector<Slvs_hEntity>& theAttributes);
44 };
45
46 #endif