#ifndef SketchSolver_ConstraintTangent_H_
#define SketchSolver_ConstraintTangent_H_
-#include "SketchSolver.h"
#include <SketchSolver_Constraint.h>
/** \class SketchSolver_ConstraintTangent
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