X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchSolver%2FSketchSolver_Group.h;h=ed938f5d0c45f9c9749cf88d06a04650f49457f3;hb=c02fae5493cc6d56c9a1db3bdcf6d872f88fea07;hp=9a78d9a2c6fa8404c7883067af9742b15d38297e;hpb=5c59bf6725e7e4855b5ca956475d705e2d5b014c;p=modules%2Fshaper.git diff --git a/src/SketchSolver/SketchSolver_Group.h b/src/SketchSolver/SketchSolver_Group.h index 9a78d9a2c..ed938f5d0 100644 --- a/src/SketchSolver/SketchSolver_Group.h +++ b/src/SketchSolver/SketchSolver_Group.h @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// Copyright (C) 2014-2019 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -12,10 +12,9 @@ // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or -// email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #ifndef SketchSolver_Group_H_ @@ -31,6 +30,10 @@ #include #include +class GeomAPI_Dir; +class GeomAPI_Pnt; +class GeomAPI_Pnt2d; + typedef std::map ConstraintConstraintMap; /** \class SketchSolver_Group @@ -66,17 +69,35 @@ class SketchSolver_Group */ bool changeConstraint(std::shared_ptr theConstraint); + /** \brief Updates the sketch feature + */ + bool updateSketch(CompositeFeaturePtr theSketch); + /** \brief Updates the data corresponding the specified feature * \param[in] theFeature the feature to be updated */ bool updateFeature(FeaturePtr theFeature); /** \brief Updates the data corresponding the specified feature moved in GUI. - * Additional Fixed constraints are created. + * Special kind of Fixed constraints is created. * \param[in] theFeature the feature to be updated - * \return \c true, if the feature is moved + * \param[in] theFrom start point of the movement + * \param[in] theTo final point of the movement + * \return \c true, if the feature is really moved */ - bool moveFeature(FeaturePtr theFeature); + bool moveFeature(FeaturePtr theFeature, + const std::shared_ptr& theFrom, + const std::shared_ptr& theTo); + /** \brief Updates the data corresponding the specified point moved in GUI. + * Special kind of Fixed constraints is created. + * \param[in] thePoint the attribute to be updated + * \param[in] theFrom start point of the movement + * \param[in] theTo final point of the movement + * \return \c true, if the attribute is really moved + */ + bool movePoint(AttributePtr thePoint, + const std::shared_ptr& theFrom, + const std::shared_ptr& theTo); /// Returns the current workplane inline const CompositeFeaturePtr& getWorkplane() const @@ -117,6 +138,10 @@ private: private: CompositeFeaturePtr mySketch; ///< Sketch for this group + std::shared_ptr mySketchOrigin; + std::shared_ptr mySketchNormal; + std::shared_ptr mySketchXDir; + ConstraintConstraintMap myConstraints; ///< List of constraints std::set myTempConstraints; ///< List of temporary constraints