1 // File: ModelAPI_ResultBody.hxx
2 // Created: 07 Jul 2014
3 // Author: Mikhail PONIKAROV
5 #ifndef ModelAPI_ResultBody_H_
6 #define ModelAPI_ResultBody_H_
8 #include "ModelAPI_Result.h"
9 #include <GeomAPI_Shape.h>
13 /**\class ModelAPI_ResultBody
15 * \brief The body (shape) result of a feature.
17 * Provides a shape that may be displayed in the viewer.
18 * May provide really huge results, so, working with this kind
19 * of result must be optimized.
21 class ModelAPI_ResultBody : public ModelAPI_Result
24 /// Returns the group identifier of this result
25 virtual std::string groupName()
30 /// Returns the group identifier of this result
31 static std::string group()
33 static std::string MY_GROUP = "Bodies";
37 /// Stores the shape (called by the execution method).
38 virtual void store(const boost::shared_ptr<GeomAPI_Shape>& theShape) = 0;
39 /// Returns the shape-result produced by this feature
40 virtual boost::shared_ptr<GeomAPI_Shape> shape() = 0;
42 /// To virtually destroy the fields of successors
43 virtual ~ModelAPI_ResultBody()
47 /// Records the subshape newShape which was generated during a topological construction.
48 /// As an example, consider the case of a face generated in construction of a box.
49 virtual void generated(
50 const boost::shared_ptr<GeomAPI_Shape>& theNewShape, const int theTag = 1) = 0;
52 /// Records the shape newShape which was generated from the shape oldShape during a topological
53 /// construction. As an example, consider the case of a face generated from an edge in
54 /// construction of a prism.
55 virtual void generated(const boost::shared_ptr<GeomAPI_Shape>& theOldShape,
56 const boost::shared_ptr<GeomAPI_Shape>& theNewShape, const int theTag = 1) = 0;
58 /// Records the shape newShape which is a modification of the shape oldShape.
59 /// As an example, consider the case of a face split or merged in a Boolean operation.
60 virtual void modified(const boost::shared_ptr<GeomAPI_Shape>& theOldShape,
61 const boost::shared_ptr<GeomAPI_Shape>& theNewShape, const int theTag = 1) = 0;
63 /// Records the shape oldShape which was deleted from the current label.
64 /// As an example, consider the case of a face removed by a Boolean operation.
66 const boost::shared_ptr<GeomAPI_Shape>& theOldShape, const int theTag = 1) = 0;
69 /// Use plugin manager for features creation: this method is
70 /// defined here only for SWIG-wrapping
76 //! Pointer on feature object
77 typedef boost::shared_ptr<ModelAPI_ResultBody> ResultBodyPtr;