X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelAPI%2FModelAPI_BodyBuilder.h;h=629e1fa9a3ca7508283b48ddc46a0e434b5dcbe4;hb=c66d90377083e2611816b72500533d4ffbc73e19;hp=537c4e4929e0987163652d1774623677f40406dc;hpb=b6be33d3af5a10e204e3bd69708d49b8b9f1a127;p=modules%2Fshaper.git diff --git a/src/ModelAPI/ModelAPI_BodyBuilder.h b/src/ModelAPI/ModelAPI_BodyBuilder.h index 537c4e492..629e1fa9a 100755 --- a/src/ModelAPI/ModelAPI_BodyBuilder.h +++ b/src/ModelAPI/ModelAPI_BodyBuilder.h @@ -20,6 +20,7 @@ class ModelAPI_Object; /**\class ModelAPI_BodyBuilder * \ingroup DataModel + * \brief Extra API for the ResultBody that allows to work with naming. */ class ModelAPI_BodyBuilder { @@ -27,7 +28,8 @@ public: MODELAPI_EXPORT virtual ~ModelAPI_BodyBuilder() {}; /// Stores the shape (called by the execution method). - virtual void store(const std::shared_ptr& theShape) = 0; + virtual void store(const std::shared_ptr& theShape, + const bool theIsStoreSameShapes = true) = 0; /// Stores the generated shape (called by the execution method). virtual void storeGenerated(const std::shared_ptr& theFromShape, @@ -38,6 +40,12 @@ public: const std::shared_ptr& theNewShape, const int theDecomposeSolidsTag = 0) = 0; + /// Stores the shape without naming support + virtual void storeWithoutNaming(const std::shared_ptr& theShape) = 0; + + /// Returns the shape-result produced by this feature + virtual std::shared_ptr shape() = 0; + /// Records the subshape newShape which was generated during a topological construction. /// As an example, consider the case of a face generated in construction of a box. virtual void generated( @@ -71,7 +79,8 @@ public: const int theKindOfShape, const int theTag, const std::string& theName, - GeomAPI_DataMapOfShapeShape& theSubShapes) = 0; + GeomAPI_DataMapOfShapeShape& theSubShapes, + const bool theIsStoreSeparate = false) = 0; /// load and orient generated shapes virtual void loadAndOrientGeneratedShapes ( GeomAlgoAPI_MakeShape* theMS, @@ -90,6 +99,14 @@ public: /// load disconnected vetexes virtual void loadDisconnectedVertexes(std::shared_ptr theShape, const std::string& theName,int& theTag) = 0; + /// Converts evolution of sub-shapes stored in naming structure to selection + /// (theFlag = true) and back (theFlag = false) + virtual void evolutionToSelection(const bool theFlag) = 0; + + /// Returns true if the latest modification of this body in the naming history + // is equal to the given shape + virtual bool isLatestEqual(const std::shared_ptr& theShape) = 0; + protected: /// Returns the data manager of this object: attributes MODELAPI_EXPORT virtual std::shared_ptr data() const; @@ -98,9 +115,10 @@ protected: MODELAPI_EXPORT virtual std::shared_ptr document() const; protected: + /// Deafult constructor accessible only from Model_Object MODELAPI_EXPORT ModelAPI_BodyBuilder(ModelAPI_Object* theOwner); - ModelAPI_Object* myOwner; + ModelAPI_Object* myOwner; ///< the owner object this builder belongs to }; //! Pointer on feature object