Salome HOME
Issue #2101: A point cannot be coincident to both, X and Y axises
[modules/shaper.git] / src / SketchSolver / SketchSolver_ConstraintTangent.h
index a6c744e44e7ff7718981433fa52674a6fbc17bb2..3f8524c340ac0b7d1a5261293eeab1c0c0fcbd5f 100644 (file)
@@ -7,7 +7,6 @@
 #ifndef SketchSolver_ConstraintTangent_H_
 #define SketchSolver_ConstraintTangent_H_
 
-#include "SketchSolver.h"
 #include <SketchSolver_Constraint.h>
 
 /** \class   SketchSolver_ConstraintTangent
@@ -19,18 +18,30 @@ class SketchSolver_ConstraintTangent : public SketchSolver_Constraint
 public:
   /// Constructor based on SketchPlugin constraint
   SketchSolver_ConstraintTangent(ConstraintPtr theConstraint) :
-      SketchSolver_Constraint(theConstraint)
+      SketchSolver_Constraint(theConstraint),
+      isArcArcInternal(false),
+      myCurveCurveAngle(0.0)
   {}
 
-  virtual int getType() const
-  { return myType; }
+  /// \brief Notify this object about the feature is changed somewhere
+  virtual void notify(const FeaturePtr&      theFeature,
+                      PlaneGCSSolver_Update* theUpdater);
 
 protected:
-  /// \brief Converts SketchPlugin constraint to a list of SolveSpace constraints
+  /// \brief Converts SketchPlugin constraint to a list of solver constraints
   virtual void process();
 
+  /// \brief Remove current constraint from the storage and build is again
+  void rebuild();
+
+  /// \brief This method is used in derived objects to check consistency of constraint.
+  ///        E.g. the distance between line and point may be signed.
+  virtual void adjustConstraint();
+
 private:
-  int myType; ///< type of constraint (applicable: SLVS_C_ARC_LINE_TANGENT, SLVS_C_CURVE_CURVE_TANGENT)
+  bool isArcArcInternal;
+  double myCurveCurveAngle;
+  AttributePtr mySharedPoint;
 };
 
 #endif