X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelAPI%2FModelAPI_AttributeSelection.h;h=904711ea2776363b14e1921203f8e0e2ebabce7b;hb=d32b7de5f466bcf611537140d7410c2b5c151c3c;hp=74802c858a77361e7bc691fa5a97e08701da7549;hpb=87b6a30a3afb8fb32e7e43ade8d9c947d9eb1684;p=modules%2Fshaper.git diff --git a/src/ModelAPI/ModelAPI_AttributeSelection.h b/src/ModelAPI/ModelAPI_AttributeSelection.h index 74802c858..904711ea2 100644 --- a/src/ModelAPI/ModelAPI_AttributeSelection.h +++ b/src/ModelAPI/ModelAPI_AttributeSelection.h @@ -24,6 +24,8 @@ #include "ModelAPI_Attribute.h" #include +class GeomAPI_Edge; + /**\class ModelAPI_AttributeSelection * \ingroup DataModel * \brief Attribute that contains reference to the sub-shape of some result, the selected shape. @@ -32,15 +34,35 @@ class ModelAPI_AttributeSelection : public ModelAPI_Attribute { public: + /// Type of the center of the circular of elliptical edge + enum CenterType { + NOT_CENTER, ///< this is not a center + CIRCLE_CENTER, ///< center of the circle + ELLIPSE_FIRST_FOCUS, ///< first focus point of the ellipse + ELLIPSE_SECOND_FOCUS, ///< second focus point of the ellipse + }; + /// Defines the result and its selected sub-shape /// \param theContext object where the sub-shape was selected /// \param theSubShape selected sub-shape (if null, the whole context is selected) /// \param theTemporarily if it is true, do not store and name the added in the data framework /// (used to remove immideately, without the following updates) - virtual void setValue( + /// \returns true if attribute was updated + virtual bool setValue( const ResultPtr& theContext, const std::shared_ptr& theSubShape, const bool theTemporarily = false) = 0; + /// Same as SetValue, but it takes an edge (on circular or elliptical curve) + /// and stores the vertex of the central point (for ellipse the first or the second focus point) + virtual void setValueCenter( + const ResultPtr& theContext, const std::shared_ptr& theEdge, + const CenterType theCenterType, + const bool theTemporarily = false) = 0; + + /// Makes this selection attribute selects the same as in theSource selection + virtual void selectValue( + const std::shared_ptr& theSource) = 0; + /// Reset temporary stored values virtual void removeTemporaryValues() = 0;