Salome HOME
Issue #2612 : Re-calculate model after modification of parameters
[modules/shaper.git] / src / Model / Model_AttributeSelection.h
index 5306aa68df25b65573dc303b3006dee5c57e8528..ac31cb3357c0628bcfa0d7a2ddb3f0485d200fb7 100644 (file)
@@ -55,13 +55,13 @@ public:
   ///           (used to remove immideately, without the following updates)
   /// \returns true if attribute was updated
   MODEL_EXPORT virtual bool setValue(
-    const ResultPtr& theContext, const std::shared_ptr<GeomAPI_Shape>& theSubShape,
+    const ObjectPtr& theContext, const std::shared_ptr<GeomAPI_Shape>& theSubShape,
     const bool theTemporarily = false);
 
   /// 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)
   MODEL_EXPORT virtual void setValueCenter(
-    const ResultPtr& theContext, const std::shared_ptr<GeomAPI_Edge>& theEdge,
+    const ObjectPtr& theContext, const std::shared_ptr<GeomAPI_Edge>& theEdge,
     const CenterType theCenterType,
     const bool theTemporarily = false);
 
@@ -78,6 +78,11 @@ public:
   /// Returns the context of the selection (the whole shape owner)
   MODEL_EXPORT virtual ResultPtr context();
 
+  /// Returns the context of the selection if the whole feature was selected
+  MODEL_EXPORT virtual FeaturePtr contextFeature();
+  /// Returns the context of the selection : result or feature
+  MODEL_EXPORT virtual std::shared_ptr<ModelAPI_Object> contextObject();
+
   /// Sets the feature object
   MODEL_EXPORT virtual void setObject(const std::shared_ptr<ModelAPI_Object>& theObject);
 
@@ -103,6 +108,10 @@ public:
   MODEL_EXPORT virtual void selectSubShape(const std::string& theType,
                                            const std::string& theSubShapeName);
 
+  /// Selects sub-shape by its inner point
+  MODEL_EXPORT virtual void selectSubShape(const std::string& theType,
+                                           const std::shared_ptr<GeomAPI_Pnt>& thePoint);
+
   /// Returns true if attribute was  initialized by some value
   MODEL_EXPORT virtual bool isInitialized();