#ifndef SketchSolver_ConstraintCoincidence_H_
#define SketchSolver_ConstraintCoincidence_H_
-#include "SketchSolver.h"
#include <SketchSolver_Constraint.h>
/** \class SketchSolver_ConstraintCoincidence
{
public:
/// Constructor based on SketchPlugin constraint
- SKETCHSOLVER_EXPORT SketchSolver_ConstraintCoincidence(ConstraintPtr theConstraint) :
- SketchSolver_Constraint(theConstraint)
+ SketchSolver_ConstraintCoincidence(ConstraintPtr theConstraint) :
+ SketchSolver_Constraint(theConstraint),
+ myInSolver(false)
{}
+ /// \brief Notify this object about the feature is changed somewhere
+ virtual void notify(const FeaturePtr& theFeature,
+ PlaneGCSSolver_Update* theUpdater);
+
+ /// \brief Remove constraint
+ virtual bool remove();
+
protected:
+ /// \brief Converts SketchPlugin constraint to a list of solver constraints
+ virtual void process();
+
/// \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);
+ virtual void getAttributes(EntityWrapperPtr& theValue,
+ std::vector<EntityWrapperPtr>& theAttributes);
+
+protected:
+ bool myInSolver; ///< shows the constraint is added to the solver
+ EntityWrapperPtr myFeatureExtremities[2]; ///< extremities of a feature, a point is coincident to
};
#endif