X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchSolver%2FSketchSolver_Group.h;h=8422b32ffddabd7a359755df30d6a201853ceb61;hb=fc72d43b677baa05ae7fd317346fd8b723b799ed;hp=4a65bf258f37c50a4d26bee21eec46add297d355;hpb=08f1aef6629e6a63cc4671d271ded4de6e826948;p=modules%2Fshaper.git diff --git a/src/SketchSolver/SketchSolver_Group.h b/src/SketchSolver/SketchSolver_Group.h index 4a65bf258..8422b32ff 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-2023 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,8 @@ #include #include +class GeomAPI_Dir; +class GeomAPI_Pnt; class GeomAPI_Pnt2d; typedef std::map ConstraintConstraintMap; @@ -68,6 +69,10 @@ 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 */ @@ -85,12 +90,14 @@ class SketchSolver_Group 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 + * \param[in] thePointOrArray the attribute to be updated + * \param[in] thePointIndex index of moved point in array + * \param[in] theFrom start point of the movement + * \param[in] theTo destination point of the movement * \return \c true, if the attribute is really moved */ - bool movePoint(AttributePtr thePoint, + bool movePoint(AttributePtr thePointOrArray, + const int thePointIndex, const std::shared_ptr& theFrom, const std::shared_ptr& theTo); @@ -110,6 +117,9 @@ class SketchSolver_Group */ bool resolveConstraints(); + /// \brief Find the list of features, which are not fully constrained. + void underconstrainedFeatures(std::set& theFeatures) const; + /// \brief Block or unblock events sent by features in this group void blockEvents(bool isBlocked); @@ -133,6 +143,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