X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchSolver%2FSketchSolver_Group.h;h=8422b32ffddabd7a359755df30d6a201853ceb61;hb=fc72d43b677baa05ae7fd317346fd8b723b799ed;hp=69ea919dc45e93f368d671fcec63c9d523554451;hpb=c4eab94a20a0d93100549a210582d46409fec1cc;p=modules%2Fshaper.git diff --git a/src/SketchSolver/SketchSolver_Group.h b/src/SketchSolver/SketchSolver_Group.h index 69ea919dc..8422b32ff 100644 --- a/src/SketchSolver/SketchSolver_Group.h +++ b/src/SketchSolver/SketchSolver_Group.h @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2019 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 @@ -30,6 +30,8 @@ #include #include +class GeomAPI_Dir; +class GeomAPI_Pnt; class GeomAPI_Pnt2d; typedef std::map ConstraintConstraintMap; @@ -67,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 */ @@ -84,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); @@ -109,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); @@ -132,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