X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchSolver%2FSketchSolver_ConstraintMovement.h;h=93b2ea001f756e2e41b544bb30070f773556c8c1;hb=9cc0e604ee4cbed8c99b916b659728f0f2dc3835;hp=0492f500693357f710c32fb3db285b85b36e093d;hpb=5634465ae5952d974470bbc741e5b4507d42b0e9;p=modules%2Fshaper.git diff --git a/src/SketchSolver/SketchSolver_ConstraintMovement.h b/src/SketchSolver/SketchSolver_ConstraintMovement.h index 0492f5006..93b2ea001 100644 --- a/src/SketchSolver/SketchSolver_ConstraintMovement.h +++ b/src/SketchSolver/SketchSolver_ConstraintMovement.h @@ -8,23 +8,29 @@ #define SketchSolver_ConstraintMovement_H_ #include "SketchSolver.h" -#include +#include /** \class SketchSolver_ConstraintMovement * \ingroup Plugins - * \brief Stores data of Rigid (Fixed) constraint for the moved feature only + * \brief Stores data to the Fixed constraint for the moved feature only */ -class SketchSolver_ConstraintMovement : public SketchSolver_ConstraintRigid +class SketchSolver_ConstraintMovement : public SketchSolver_ConstraintFixed { private: /// Creates constraint to manage the given constraint from plugin SketchSolver_ConstraintMovement(ConstraintPtr theConstraint) - : SketchSolver_ConstraintRigid(theConstraint) + : SketchSolver_ConstraintFixed(theConstraint) {} public: /// Creates temporary constraint based on feature - SketchSolver_ConstraintMovement(FeaturePtr theFeature); + SketchSolver_ConstraintMovement(FeaturePtr theFeature) + : SketchSolver_ConstraintFixed(theFeature) + {} + + /// \brief Tries to remove constraint + /// \return \c false, if current constraint contains another SketchPlugin constraints (like for multiple coincidence) + virtual bool remove(); protected: /// \brief Converts SketchPlugin constraint to a list of SolveSpace constraints @@ -32,9 +38,11 @@ protected: /// \brief Generate list of attributes of constraint in order useful for SolveSpace constraints /// \param[out] theValue numerical characteristic of constraint (e.g. distance) - /// \param[out] theAttributes list of attributes to be filled - /// \param[out] theIsFullyMoved shows that the feature is moved, in other case only one point of the feature is shifted - virtual void getAttributes(double& theValue, std::vector& theAttributes, bool& theIsFullyMoved); + /// \param[out] theAttributes list of attributes to be filled (list of moved entities or attributes) + virtual void getAttributes(ParameterWrapperPtr& theValue, std::vector& theAttributes); + +private: + std::vector myMovedEntities; ///< list of entities that are moved }; #endif