Salome HOME
0023197: [CEA] Extract and rebuild
[modules/geom.git] / src / GEOMImpl / GEOMImpl_IShapesOperations.hxx
index d8e4f9fb21606071fd9146a6282c088ddf210850..38b3750594980dde91772029809faad269ed9ba9 100644 (file)
@@ -59,6 +59,25 @@ class GEOMImpl_IShapesOperations : public GEOM_IOperations
     All       = Groups | Fields | SubShapes,
   };
 
+  /**
+   * This enumeration represents an extraction statistics type.
+   */
+  enum ExtractionStatType
+  {
+    EST_Removed,  ///< Removed sub-shapes
+    EST_Modified, ///< Modified sub-shapes
+    EST_Added     ///< Newly created sub-shapes
+  };
+
+  /*!
+   * This structure defines a format of extraction statistics.
+   */
+  struct ExtractionStat
+  {
+    ExtractionStatType          type;    ///< Type of extraction statistics.
+    std::list<Standard_Integer> indices; ///< Shape indices touched by this type of modification.
+  };
+
   Standard_EXPORT GEOMImpl_IShapesOperations(GEOM_Engine* theEngine, int theDocID);
   Standard_EXPORT ~GEOMImpl_IShapesOperations();
 
@@ -470,6 +489,21 @@ class GEOMImpl_IShapesOperations : public GEOM_IOperations
                       const GEOMUtils::ComparisonCondition  theCondition,
                       const Standard_Real                   theTolerance);
 
+  /*!
+   * \brief Return the shape that is constructed from theShape without
+   * extracted sub-shapes from the input list.
+   *
+   * \param theShape the original shape.
+   * \param theSubShapeIDs the list of sub-shape IDs to be extracted from
+   *        the original shape.
+   * \param theStats the operation statistics. Output parameter.
+   * \return the shape without extracted sub-shapes.
+   */
+  Handle(GEOM_Object) MakeExtraction
+                     (const Handle(GEOM_Object)              &theShape,
+                      const Handle(TColStd_HArray1OfInteger) &theSubShapeIDs,
+                      std::list<ExtractionStat>              &theStats);
+
  private:
   Handle(GEOM_Object) MakeShape (std::list<Handle(GEOM_Object)>      theShapes,
                                  const Standard_Integer         theObjectType,