X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchSolver%2FSketchSolver_Group.h;h=4eb67e619784c0fa56daabd6d6679f4834e92635;hb=68a3f0934001109743353b6cc2ac42d8b92bd868;hp=507386d03e9928b83b0c578333422b25ec10b097;hpb=8f10db487ef409d859a62aa6e2235a17d9b56723;p=modules%2Fshaper.git diff --git a/src/SketchSolver/SketchSolver_Group.h b/src/SketchSolver/SketchSolver_Group.h index 507386d03..4eb67e619 100644 --- a/src/SketchSolver/SketchSolver_Group.h +++ b/src/SketchSolver/SketchSolver_Group.h @@ -10,18 +10,14 @@ #include "SketchSolver.h" #include #include -#include -#include +#include #include -#include #include -#include #include #include #include -#include #include typedef std::map ConstraintConstraintMap; @@ -42,22 +38,17 @@ class SketchSolver_Group ~SketchSolver_Group(); /// \brief Returns group's unique identifier - inline const Slvs_hGroup& getId() const + inline const GroupID& getId() const { return myID; } /// \brief Returns identifier of the workplane - inline const Slvs_hEntity& getWorkplaneId() const + inline const EntityID& getWorkplaneId() const { return myWorkplaneID; } - /// \brief Find the identifier of the feature, if it already exists in the group - Slvs_hEntity getFeatureId(FeaturePtr theFeature) const; - /// \brief Find the identifier of the attribute, if it already exists in the group - Slvs_hEntity getAttributeId(AttributePtr theAttribute) const; - /// \brief Returns true if the group has no constraints yet inline bool isEmpty() const { @@ -82,19 +73,19 @@ class SketchSolver_Group /** \brief Updates the data corresponding the specified feature * \param[in] theFeature the feature to be updated */ - bool updateFeature(std::shared_ptr theFeature); + bool updateFeature(FeaturePtr theFeature); /** \brief Updates the data corresponding the specified feature moved in GUI. * Additional Fixed constraints are created. * \param[in] theFeature the feature to be updated */ - void moveFeature(std::shared_ptr theFeature); + void moveFeature(FeaturePtr theFeature); /** \brief Verifies the feature attributes are used in this group * \param[in] theFeature constraint or any other object for verification of interaction * \return \c true if some of attributes are used in current group */ - bool isInteract(std::shared_ptr theFeature) const; + bool isInteract(FeaturePtr theFeature) const; /** \brief Verifies the specified feature is equal to the base workplane for this group * \param[in] theWorkplane the feature to be compared with base workplane @@ -126,7 +117,7 @@ class SketchSolver_Group /** \brief Cut from the group several subgroups, which are not connected to the current one by any constraint * \param[out] theCuts enlarge this list by newly created groups */ - void splitGroup(std::vector& theCuts); + void splitGroup(std::list& theCuts); /** \brief Start solution procedure if necessary and update attributes of features * \return \c false when no need to solve constraints @@ -155,10 +146,7 @@ private: */ bool addWorkplane(CompositeFeaturePtr theSketch); - /// \brief Apply temporary rigid constraints for the list of features - void fixFeaturesList(AttributeRefListPtr theList); - - /// \brief Append given constraint to th group of temporary constraints + /// \brief Append given constraint to the group of temporary constraints void setTemporary(SolverConstraintPtr theConstraint); /// \brief Verifies is the feature valid @@ -167,12 +155,9 @@ private: /// \brief Update just changed constraints void updateConstraints(); - /// \brief Update Multi-Translation/-Rotation constraints due to multi coincidence appears/disappears - void notifyMultiConstraints(); - private: - Slvs_hGroup myID; ///< Index of the group - Slvs_hEntity myWorkplaneID; ///< Index of workplane, the group is based on + GroupID myID; ///< Index of the group + EntityID myWorkplaneID; ///< Index of workplane, the group is based on CompositeFeaturePtr mySketch; ///< Sketch is equivalent to workplane ConstraintConstraintMap myConstraints; ///< List of constraints std::set myTempConstraints; ///< List of temporary constraints @@ -180,9 +165,8 @@ private: std::set myChangedConstraints; ///< List of just updated constraints StoragePtr myStorage; ///< Container for the set of SolveSpace constraints and their entities - FeatureStoragePtr myFeatureStorage; ///< Container for the set of SketchPlugin features and their dependencies - SketchSolver_Solver myConstrSolver; ///< Solver for set of equations obtained by constraints + SolverPtr mySketchSolver; ///< Solver for set of equations obtained by constraints bool myPrevSolved; ///< Indicates that previous solving was done correctly };