- MODEL_EXPORT virtual std::shared_ptr<ModelAPI_Feature>
- feature(const std::string& theGroupID, const int theIndex);
-
- ///! Returns the vector of groups already added to the document
- MODEL_EXPORT virtual const std::vector<std::string>& getGroups() const;
-
- //! Returns the index of feature in the group (zero based)
- //! \retruns -1 if not found
- MODEL_EXPORT virtual int featureIndex(std::shared_ptr<ModelAPI_Feature> theFeature);
-
-protected:
-
- //! Returns (creates if needed) the group label
- TDF_Label groupLabel(const std::string theGroup);
+ //! \param theGroupID group that contains a feature
+ //! \param theIndex zero-based index of feature in the group
+ //! \param isOperation if it is true, returns feature (not Object)
+ //! \param theHidden if it is true, it counts also the features that are not in tree
+ MODEL_EXPORT virtual ObjectPtr object(const std::string& theGroupID, const int theIndex,
+ const bool theHidden = false);
+
+ //! Returns the number of features in the group
+ //! If theHidden is true, it counts also the features that are not in tree
+ MODEL_EXPORT virtual int size(const std::string& theGroupID, const bool theHidden = false);
+
+ /// Creates a construction cresults
+ MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_ResultConstruction> createConstruction(
+ const boost::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0);
+ /// Creates a body results
+ MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_ResultBody> createBody(
+ const boost::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0);
+ /// Creates a part results
+ MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_ResultPart> createPart(
+ const boost::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0);
+
+ //! Returns a feature by result (owner of result)
+ MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_Feature>
+ feature(const boost::shared_ptr<ModelAPI_Result>& theResult);
+
+ ///! Returns true if parametric updater need to execute feature on recomputartion
+ ///! On abort, undo or redo it is not necessary: results in document are updated automatically
+ bool executeFeatures() {return myExecuteFeatures;}
+
+ protected:
+
+ //! Returns (creates if needed) the features label
+ TDF_Label featuresLabel();