1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: Model_ResultCompSolid.h
4 // Created: 20 Jul 2015
5 // Author: Natalia ERMOLAEVA
7 #ifndef Model_ResultCompSolid_H_
8 #define Model_ResultCompSolid_H_
11 #include <ModelAPI_ResultCompSolid.h>
13 /**\class Model_ResultCompSolid
15 * \brief The compsolid (container of body results) result of a feature.
17 * Provides a container of shapes that may be displayed in the viewer.
19 class Model_ResultCompSolid : public ModelAPI_ResultCompSolid
22 /// Removes the stored builders
23 MODEL_EXPORT virtual ~Model_ResultCompSolid();
25 /// Adds result to the sketch and to its document
26 virtual std::shared_ptr<ModelAPI_ResultBody> addResult(std::string theID);
28 /// Returns the number of sub-elements
29 virtual int numberOfSubs(bool forTree = false) const;
31 /// Returns the sub-result by zero-base index
32 virtual std::shared_ptr<ModelAPI_ResultBody> subResult(const int theIndex,
33 bool forTree = false) const;
35 /// Returns the sub-feature unique identifier in this composite feature by zero-base index
36 virtual int subResultId(const int theIndex) const;
38 /// Returns true if feature or reuslt belong to this composite feature as subs
39 virtual bool isSub(ObjectPtr theObject) const;
41 /// This method to inform that sub-feature is removed and must be removed from the internal data
42 /// structures of the owner (the remove from the document will be done outside just after)
43 virtual void removeResult(std::shared_ptr<ModelAPI_ResultBody> theResult);
46 /// Makes a body on the given feature
47 Model_ResultCompSolid();
49 friend class Model_Objects;