+ /// \brief Notify constraint, that coincidence appears or removed
+ virtual void notifyCoincidenceChanged(EntityWrapperPtr theCoincAttr1,
+ EntityWrapperPtr theCoincAttr2) { /* implement in derived class */ }
+
+ /// \brief Shows error message
+ const std::string& error() const
+ { return myErrorMsg; }
+
+protected:
+ /// \brief Converts SketchPlugin constraint to a list of solver's 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);
+
+ /// \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()
+ {}
+
+ /// \brief Removes last error
+ void cleanErrorMsg()
+ { myErrorMsg.clear(); }
+
+protected:
+ GroupID myGroupID; ///< identifier of the group, the constraint belongs to
+ EntityID mySketchID; ///< identifier of the sketch, the constraint belongs to
+ ConstraintPtr myBaseConstraint; ///< base SketchPlugin constraint
+
+ /// storage, which contains all information about entities and constraints
+ StoragePtr myStorage;
+ SketchSolver_ConstraintType myType; ///< type of constraint
+ std::list<EntityWrapperPtr> myAttributes; ///< attributes of constraint
+
+ std::string myErrorMsg; ///< error message