X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchSolver%2FSketchSolver_ConstraintGroup.h;h=69c1a7c04584e6894796a4ab1fcc4f85a1da8e8b;hb=ac8b1dc043f53cbf4f9c2a368e0c214669c21176;hp=c24268f30d8353e99910df5a357f5daf08763810;hpb=f110eb63ab21edb33e7abc9aba8e3e96f3d21544;p=modules%2Fshaper.git diff --git a/src/SketchSolver/SketchSolver_ConstraintGroup.h b/src/SketchSolver/SketchSolver_ConstraintGroup.h index c24268f30..69c1a7c04 100644 --- a/src/SketchSolver/SketchSolver_ConstraintGroup.h +++ b/src/SketchSolver/SketchSolver_ConstraintGroup.h @@ -104,6 +104,7 @@ protected: * \return identifier of changed entity or 0 if entity could not be changed */ Slvs_hEntity changeEntity(boost::shared_ptr theEntity); + Slvs_hEntity changeEntity(FeaturePtr theEntity); /** \brief Adds or updates a normal in the group * @@ -158,6 +159,14 @@ private: */ 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 + * \param[in] thePoint2 identifier of the second point + * \return \c true if the points are added successfully, and + * \c false if the constraint is the extra one (should not be created in SolveSpace) + */ + bool addCoincidentPoints(const Slvs_hEntity& thePoint1, const Slvs_hEntity& thePoint2); + private: // SolveSpace entities Slvs_hGroup myID; ///< the index of the group @@ -175,10 +184,6 @@ private: std::vector myTempPointWhereDragged; ///< Parameters of one of the points which is moved by user Slvs_hEntity myTempPointWDrgdID; ///< Identifier of such point std::list myTempConstraints; ///< The list of identifiers of temporary constraints (SLVS_C_WHERE_DRAGGED) applied for all other points moved by user - // NOTE: First ID in the list corresponds to myTempPointWhereDragged parameters and does not added to myConstraints list - - std::vector< std::set > - myCoincidentPoints; ///< Stores the lists of identifiers of coincident points (to avoid unnecessary coincidence constraints) // SketchPlugin entities boost::shared_ptr @@ -186,7 +191,16 @@ private: std::map, Slvs_hConstraint> myConstraintMap; ///< The map between SketchPlugin and SolveSpace constraints std::map, Slvs_hEntity> - myEntityMap; ///< The map between parameters of constraints and their equivalent SolveSpace entities + 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 + + // Conincident items + std::vector< std::set > + myCoincidentPoints; ///< Stores the lists of identifiers of coincident points (to avoid unnecessary coincidence constraints) + std::set< boost::shared_ptr > + myExtraCoincidence; ///< Additional coincidence constraints which are not necessary (coincidence between points already done + ///< by other constraints) but created by GUI tools. Useful when some coincidence constraints were removed }; #endif