Salome HOME
Issues #2027: trim on cirlce(arc will be created). Result of selected will clear...
[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_Constraint.h>
11
12 /** \class   SketchSolver_ConstraintTangent
13  *  \ingroup Plugins
14  *  \brief   Convert tangency constraint to SolveSpace structure
15  */
16 class SketchSolver_ConstraintTangent : public SketchSolver_Constraint
17 {
18 public:
19   /// Constructor based on SketchPlugin constraint
20   SketchSolver_ConstraintTangent(ConstraintPtr theConstraint) :
21       SketchSolver_Constraint(theConstraint),
22       isArcArcInternal(false),
23       myCurveCurveAngle(0.0)
24   {}
25
26   /// \brief Notify this object about the feature is changed somewhere
27   virtual void notify(const FeaturePtr&      theFeature,
28                       PlaneGCSSolver_Update* theUpdater);
29
30 protected:
31   /// \brief Converts SketchPlugin constraint to a list of solver constraints
32   virtual void process();
33
34   /// \brief Remove current constraint from the storage and build is again
35   void rebuild();
36
37   /// \brief This method is used in derived objects to check consistency of constraint.
38   ///        E.g. the distance between line and point may be signed.
39   virtual void adjustConstraint();
40
41 private:
42   bool isArcArcInternal;
43   double myCurveCurveAngle;
44   AttributePtr mySharedPoint;
45 };
46
47 #endif