Salome HOME
SketchSolver Refactoring: Eliminate SolveSpace as a sketch solver.
[modules/shaper.git] / src / SketchSolver / SketchSolver_ConstraintTangent.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:    SketchSolver_ConstraintTangent.h
4 // Created: 1 Apr 2015
5 // Author:  Artem ZHIDKOV
6
7 #ifndef SketchSolver_ConstraintTangent_H_
8 #define SketchSolver_ConstraintTangent_H_
9
10 #include "SketchSolver.h"
11 #include <SketchSolver_Constraint.h>
12
13 /** \class   SketchSolver_ConstraintTangent
14  *  \ingroup Plugins
15  *  \brief   Convert tangency constraint to SolveSpace structure
16  */
17 class SketchSolver_ConstraintTangent : public SketchSolver_Constraint
18 {
19 public:
20   /// Constructor based on SketchPlugin constraint
21   SketchSolver_ConstraintTangent(ConstraintPtr theConstraint) :
22       SketchSolver_Constraint(theConstraint),
23       isArcArcInternal(false)
24   {}
25
26 protected:
27   /// \brief Generate list of attributes of constraint in order useful for constraints
28   /// \param[out] theValue      numerical characteristic of constraint (e.g. distance)
29   /// \param[out] theAttributes list of attributes to be filled
30   virtual void getAttributes(EntityWrapperPtr&              theValue,
31                              std::vector<EntityWrapperPtr>& theAttributes) override;
32
33   /// \brief This method is used in derived objects to check consistency of constraint.
34   ///        E.g. the distance between line and point may be signed.
35   virtual void adjustConstraint() override;
36
37 private:
38   bool isArcArcInternal;
39 };
40
41 #endif