Salome HOME
Issue #2101: A point cannot be coincident to both, X and Y axises
[modules/shaper.git] / src / SketchSolver / SketchSolver_ConstraintTangent.h
index e1716bf74b5c4c493d20ec4c6a298c101b684122..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,14 +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)
   {}
 
+  /// \brief Notify this object about the feature is changed somewhere
+  virtual void notify(const FeaturePtr&      theFeature,
+                      PlaneGCSSolver_Update* theUpdater);
+
 protected:
-  /// \brief Generate list of attributes of constraint in order useful for constraints
-  /// \param[out] theValue      numerical characteristic of constraint (e.g. distance)
-  /// \param[out] theAttributes list of attributes to be filled
-  virtual void getAttributes(double& theValue, std::vector<EntityWrapperPtr>& theAttributes);
+  /// \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:
+  bool isArcArcInternal;
+  double myCurveCurveAngle;
+  AttributePtr mySharedPoint;
 };
 
 #endif