Salome HOME
Issue #517 implementation: naming of sketch elements now independent on feature sketc...
[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   SketchSolver_ConstraintFillet(ConstraintPtr theConstraint) :
21       SketchSolver_Constraint(theConstraint)
22   {}
23
24   virtual int getType() const
25   { return SLVS_C_FILLET; }
26
27   /// \brief Tries to remove constraint
28   /// \return \c false, if current constraint contains another SketchPlugin constraints (like for multiple coincidence)
29   virtual bool remove(ConstraintPtr theConstraint = ConstraintPtr());
30
31 protected:
32   /// \brief Converts SketchPlugin constraint to a list of SolveSpace constraints
33   virtual void process();
34
35   /// \brief Generate list of attributes of constraint in order useful for SolveSpace constraints
36   /// \param[out] theValue      numerical characteristic of constraint (e.g. distance)
37   /// \param[out] theAttributes list of attributes to be filled
38   ///
39   /// Parameter theAttributes contains 5 elements:
40   /// Two first entities in theAttributes list correspond to base features of fillet,
41   /// the next two entities represent trimmed base features and the last one is a fillet arc.
42   virtual void getAttributes(double& theValue, std::vector<Slvs_hEntity>& theAttributes);
43 };
44
45 #endif