X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchSolver%2FSketchSolver_ConstraintGroup.h;h=c8a673029e2ce047589e971d17e7cdb2b132dd70;hb=cdd9efd8fbc75f120188ae16eed7471dc6492ac3;hp=f8258f90f05095afe792a0f2db35fc65b546acd1;hpb=d0995d76f7a7f1ff72981efc4ffb46a98e9585fb;p=modules%2Fshaper.git diff --git a/src/SketchSolver/SketchSolver_ConstraintGroup.h b/src/SketchSolver/SketchSolver_ConstraintGroup.h index f8258f90f..c8a673029 100644 --- a/src/SketchSolver/SketchSolver_ConstraintGroup.h +++ b/src/SketchSolver/SketchSolver_ConstraintGroup.h @@ -16,6 +16,9 @@ #include #include +typedef std::map< boost::shared_ptr, std::vector > + ConstraintMap; + /** \class SketchSolver_ConstraintGroup * \ingroup DataModel * \brief Keeps the group of constraints which based on the same entities @@ -27,7 +30,7 @@ class SketchSolver_ConstraintGroup * Throws an exception if theWorkplane is not an object of SketchPlugin_Sketch type * \remark Type of theSketch is not verified inside */ - SketchSolver_ConstraintGroup(boost::shared_ptr theWorkplane); + SketchSolver_ConstraintGroup(boost::shared_ptr theWorkplane); ~SketchSolver_ConstraintGroup(); @@ -54,6 +57,7 @@ class SketchSolver_ConstraintGroup * \return \c true if the constraint added or updated successfully */ bool changeConstraint(boost::shared_ptr theConstraint); + bool changeRigidConstraint(boost::shared_ptr theConstraint); /** \brief Verifies the feature attributes are used in this group * \param[in] theFeature constraint or any other object for verification of interaction @@ -65,9 +69,9 @@ class SketchSolver_ConstraintGroup * \param[in] theWorkplane the feature to be compared with base workplane * \return \c true if workplanes are the same */ - bool isBaseWorkplane(boost::shared_ptr theWorkplane) const; + bool isBaseWorkplane(boost::shared_ptr theWorkplane) const; - boost::shared_ptr getWorkplane() const + boost::shared_ptr getWorkplane() const { return mySketch; } @@ -174,15 +178,17 @@ protected: bool theAllowToFit = true); /** \brief Remove all temporary constraint after computation finished + * \param[in] theRemoved indexes of constraints to be removed. If empty, all temporary constraints should be deleted */ - void removeTemporaryConstraints(); + void removeTemporaryConstraints(const std::set& theRemoved = + std::set()); private: /** \brief Creates a workplane from the sketch parameters * \param[in] theSketch parameters of workplane are the attributes of this sketch * \return \c true if success, \c false if workplane parameters are not consistent */ - bool addWorkplane(boost::shared_ptr theSketch); + bool addWorkplane(boost::shared_ptr theSketch); /** \brief Add the entities of constraint for points coincidence into the appropriate list * \param[in] thePoint1 identifier of the first point @@ -218,8 +224,8 @@ protected: std::list myTempConstraints; ///< The list of identifiers of temporary constraints (SLVS_C_WHERE_DRAGGED) applied for all other points moved by user // SketchPlugin entities - boost::shared_ptr mySketch; ///< Equivalent to workplane - std::map, Slvs_hConstraint> myConstraintMap; ///< The map between SketchPlugin and SolveSpace constraints + boost::shared_ptr mySketch; ///< Equivalent to workplane + ConstraintMap myConstraintMap; ///< The map between SketchPlugin and SolveSpace constraints std::map, Slvs_hEntity> myEntityAttrMap; ///< The map between "attribute" parameters of constraints and their equivalent SolveSpace entities std::map myEntityFeatMap; ///< The map between "feature" parameters of constraints and their equivalent SolveSpace entities