Salome HOME
Angle presentation from NewGEOM_2.0.0. It is moved here to prepare a patch for OCCT...
[modules/shaper.git] / src / ModelAPI / ModelAPI_ResultBody.h
index 7565d07bfeaab1c80b81aafe71b07961b114b7a4..ad5846e0f10a84927141a7b1f729b954c35d2bad 100644 (file)
@@ -44,8 +44,11 @@ public:
     return RESULT_BODY_COLOR;
   }
 
-  /// Stores the shape (called by the execution method).
-  MODELAPI_EXPORT virtual void store(const std::shared_ptr<GeomAPI_Shape>& theShape);
+  /// \brief Stores the shape (called by the execution method).
+  /// param[in] theShape shape to store.
+  /// param[in] theIsStoreSameShapes if false stores reference to the same shape if it is already in document.
+  MODELAPI_EXPORT virtual void store(const std::shared_ptr<GeomAPI_Shape>& theShape,
+                                     const bool theIsStoreSameShapes = true);
 
   /// Stores the generated shape (called by the execution method).
   MODELAPI_EXPORT virtual void storeGenerated(const std::shared_ptr<GeomAPI_Shape>& theFromShape,
@@ -55,6 +58,10 @@ public:
   MODELAPI_EXPORT virtual void storeModified(const std::shared_ptr<GeomAPI_Shape>& theOldShape,
     const std::shared_ptr<GeomAPI_Shape>& theNewShape, const int theDecomposeSolidsTag = 0);
 
+  /// Stores the shape without naming support
+  MODELAPI_EXPORT virtual void storeWithoutNaming(
+    const std::shared_ptr<GeomAPI_Shape>& theShape);
+
   /// Returns the shape-result produced by this feature
   MODELAPI_EXPORT virtual std::shared_ptr<GeomAPI_Shape> shape();
 
@@ -89,7 +96,7 @@ public:
   /// load and orient modified shapes
   MODELAPI_EXPORT virtual void loadAndOrientModifiedShapes (GeomAlgoAPI_MakeShape* theMS,
     std::shared_ptr<GeomAPI_Shape>  theShapeIn, const int  theKindOfShape, const int  theTag,
-    const std::string& theName, GeomAPI_DataMapOfShapeShape& theSubShapes);
+    const std::string& theName, GeomAPI_DataMapOfShapeShape& theSubShapes, const bool theIsStoreSeparate = false);
   /// load and orient generated shapes
   MODELAPI_EXPORT virtual void loadAndOrientGeneratedShapes (GeomAlgoAPI_MakeShape* theMS,
     std::shared_ptr<GeomAPI_Shape>  theShapeIn, const int  theKindOfShape,
@@ -107,10 +114,15 @@ public:
   MODELAPI_EXPORT virtual void loadDisconnectedVertexes(std::shared_ptr<GeomAPI_Shape> theShape,
     const std::string& theName,int&  theTag);
 
+  /// Returns true if the latest modification of this body in the naming history
+  // is equal to the given shape
+  MODELAPI_EXPORT virtual bool isLatestEqual(const std::shared_ptr<GeomAPI_Shape>& theShape) = 0;
+
 protected:
+  /// Default constructor accessible only from Model_Objects
   MODELAPI_EXPORT ModelAPI_ResultBody();
 
-  ModelAPI_BodyBuilder* myBuilder; /// provide the body processing in naming shape
+  ModelAPI_BodyBuilder* myBuilder; ///< provides the body processing in naming shape
 };
 
 //! Pointer on feature object