]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
GetInPlace method refactoring
authorskv <skv@opencascade.com>
Fri, 12 Dec 2014 09:04:55 +0000 (12:04 +0300)
committerskv <skv@opencascade.com>
Fri, 12 Dec 2014 09:04:55 +0000 (12:04 +0300)
src/GEOMAlgo/GEOMAlgo_GetInPlaceAPI.cxx
src/GEOMAlgo/GEOMAlgo_GetInPlaceAPI.hxx
src/GEOMImpl/GEOMImpl_CopyDriver.cxx
src/GEOMImpl/GEOMImpl_CopyDriver.hxx
src/GEOMImpl/GEOMImpl_IShapesOperations.cxx
src/GEOMImpl/GEOMImpl_IShapesOperations.hxx

index bc5c709af91d372e2b548d6ab3bdd472e8dd8040..f531ba16ec9675970c6ef53363f0a3e692b8972d 100644 (file)
@@ -25,6 +25,7 @@
 
 
 #include <GEOMAlgo_GetInPlaceAPI.hxx>
+#include <GEOMAlgo_GetInPlace.hxx>
 #include <GEOM_Function.hxx>
 #include <GEOM_Object.hxx>
 #include <GEOMUtils.hxx>
 #include <TopTools_MapOfShape.hxx>
 
 
+//=======================================================================
+//function : GetInPlace
+//purpose  : 
+//=======================================================================
+Standard_Boolean GEOMAlgo_GetInPlaceAPI::GetInPlace
+                      (const TopoDS_Shape        &theWhere,
+                       const TopoDS_Shape        &theWhat,
+                             GEOMAlgo_GetInPlace &theGIP)
+{
+  if (theWhere.IsNull() || theWhat.IsNull()) {
+    return Standard_False;
+  }
+
+  // Compute confusion tolerance.
+  Standard_Real    aTolConf = Precision::Confusion();
+  Standard_Integer i;
+
+  for (i = 0; i < 2; ++i) {
+    TopExp_Explorer anExp(i == 0 ? theWhere : theWhat, TopAbs_VERTEX);
+
+    for (; anExp.More(); anExp.Next()) {
+      const TopoDS_Vertex aVtx = TopoDS::Vertex(anExp.Current());
+      const Standard_Real aTolVtx = BRep_Tool::Tolerance(aVtx);
+
+      if (aTolVtx > aTolConf) {
+        aTolConf = aTolVtx;
+      }
+    }
+  }
+
+  // Compute mass tolerance.
+  Bnd_Box       aBoundingBox;
+  Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
+  Standard_Real aMassTol;
+
+  BRepBndLib::Add(theWhere, aBoundingBox);
+  BRepBndLib::Add(theWhat,  aBoundingBox);
+  aBoundingBox.Get(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);
+  aMassTol = Max(aXmax - aXmin, aYmax - aYmin);
+  aMassTol = Max(aMassTol, aZmax - aZmin);
+  aMassTol *= aTolConf;
+
+  // Searching for the sub-shapes inside the ShapeWhere shape
+  theGIP.SetTolerance(aTolConf);
+  theGIP.SetTolMass(aMassTol);
+  theGIP.SetTolCG(aTolConf);
+
+  theGIP.SetArgument(theWhat);
+  theGIP.SetShapeWhere(theWhere);
+
+  theGIP.Perform();
+
+  int iErr = theGIP.ErrorStatus();
+
+  if (iErr) {
+    return Standard_False;
+  }
+
+  return Standard_True;
+}
+
 //=======================================================================
 //function : GetInPlaceOld
 //purpose  : 
index 43a8d6e9003a757dd56546e93c059962e763f848..36ed52d466bada798741e9bfebb74018075504d2 100644 (file)
@@ -29,6 +29,7 @@
 
 #include <gp_Vec.hxx>
 
+class GEOMAlgo_GetInPlace;
 class Handle_GEOM_Function;
 class BRepExtrema_DistShapeShape;
 class TopoDS_Face;
@@ -48,6 +49,17 @@ class GEOMAlgo_GetInPlaceAPI
 
 public:
 
+  /**
+   *  \brief New GetInPlace method implementation.
+   *  Initializes the GEOMAlgo_GetInPlace object with correct parameters and
+   *  performs computation (calls theGIP's method Perform. Returns
+   *  Standard_True in face of success; Standard_False otherwise.
+   */
+  Standard_EXPORT static Standard_Boolean GetInPlace
+                      (const TopoDS_Shape        &theWhere,
+                       const TopoDS_Shape        &theWhat,
+                             GEOMAlgo_GetInPlace &theGIP);
+
   /*!
    *  \brief Old implementation of GetInPlace algoritm.
    *  This method searches among sub shapes of the shape theWhere parts that are
@@ -66,7 +78,7 @@ public:
 
 
   /**
-   *  \brief GetInPlaceBy history method implementation.
+   *  \brief GetInPlaceByHistory method implementation.
    *  Returns Standard_True if something is found. Warning: theShapesInPlace
    *  list is not cleared at first.
    */
index 09ea9bba58200a673f070a83397120369093992e..427451f5ed807af451e2142baae458751417aafc 100644 (file)
 #include "GEOMAlgo_GetInPlace.hxx"
 #include "GEOMAlgo_GetInPlaceAPI.hxx"
 
-#include <Bnd_Box.hxx>
-#include <BRep_Tool.hxx>
-#include <BRepBndLib.hxx>
-#include <gp_Pnt.hxx>
-#include <Precision.hxx>
-#include <TopoDS.hxx>
 #include <TopoDS_Shape.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <TopAbs.hxx>
 #include <TopExp.hxx>
-#include <TopExp_Explorer.hxx>
 #include <TNaming_CopyShape.hxx>
 #include <TColStd_IndexedDataMapOfTransientTransient.hxx>
+#include <TFunction_Logbook.hxx>
 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
 #include <TopTools_IndexedMapOfShape.hxx>
 #include <TopTools_ListIteratorOfListOfShape.hxx>
@@ -208,6 +200,7 @@ Standard_Integer GEOMImpl_CopyDriver::transferData(TFunction_Logbook& log) const
   GEOMImpl_ITransferData                  aTD2(aRef2);
   Standard_Integer                        i;
   Standard_Integer                        aNbShapes = anIndices1.Extent();
+  TopTools_MapOfShape                     aMapFence;
 
   aDatumName->SetValue(DATUM_NAME_INDEX,     "GEOM_TRANSFER_DATA_NAMES");
   aDatumName->SetValue(DATUM_MATERIAL_INDEX, "GEOM_TRANSFER_DATA_MATERIALS");
@@ -232,7 +225,9 @@ Standard_Integer GEOMImpl_CopyDriver::transferData(TFunction_Logbook& log) const
         for (; anIt.More(); anIt.Next()) {
           const TopoDS_Shape &aShapeDest = anIt.Value();
 
-          aTD2.SetName(aShapeDest, aName);
+          if (aMapFence.Add(aShapeDest)) {
+            aTD2.SetName(aShapeDest, aName);
+          }
         }
       }
     }
@@ -252,7 +247,9 @@ Standard_Integer GEOMImpl_CopyDriver::transferData(TFunction_Logbook& log) const
         for (; anIt.More(); anIt.Next()) {
           const TopoDS_Shape &aShapeDest = anIt.Value();
 
-          aTD2.SetMaterial(aShapeDest, aMaterial);
+          if (aMapFence.Add(aShapeDest)) {
+            aTD2.SetMaterial(aShapeDest, aMaterial);
+          }
         }
       }
     }
@@ -279,66 +276,28 @@ Standard_Boolean GEOMImpl_CopyDriver::getInPlace
      const TopoDS_Shape                              &theDestinationShape,
            TopTools_IndexedDataMapOfShapeListOfShape &theMapSourceDest) const
 {
-  // Compute confusion tolerance.
-  Standard_Real    aTolConf = Precision::Confusion();
-  Standard_Integer i;
-
-  for (i = 0; i < 2; ++i) {
-    TopExp_Explorer anExp
-      (i == 0 ? theSourceShape : theDestinationShape, TopAbs_VERTEX);
-
-    for (; anExp.More(); anExp.Next()) {
-      const TopoDS_Vertex aVtx = TopoDS::Vertex(anExp.Current());
-      const Standard_Real aTolVtx = BRep_Tool::Tolerance(aVtx);
-
-      if (aTolVtx > aTolConf) {
-        aTolConf = aTolVtx;
-      }
-    }
-  }
-
-  // Compute mass tolerance.
-  Bnd_Box       aBoundingBox;
-  Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
-  Standard_Real aMassTol;
-
-  BRepBndLib::Add(theSourceShape, aBoundingBox);
-  BRepBndLib::Add(theDestinationShape, aBoundingBox);
-  aBoundingBox.Get(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);
-  aMassTol = Max(aXmax - aXmin, aYmax - aYmin);
-  aMassTol = Max(aMassTol, aZmax - aZmin);
-  aMassTol *= aTolConf;
-
-  // Searching for the sub-shapes inside the ShapeWhere shape
+  // Searching for the sub-shapes inside theDestinationShape shape
   GEOMAlgo_GetInPlace aGIP;
-  aGIP.SetTolerance(aTolConf);
-  aGIP.SetTolMass(aMassTol);
-  aGIP.SetTolCG(aTolConf);
-
-  aGIP.SetArgument(theSourceShape);
-  aGIP.SetShapeWhere(theDestinationShape);
 
-  aGIP.Perform();
-
-  int iErr = aGIP.ErrorStatus();
-
-  if (iErr) {
+  if (!GEOMAlgo_GetInPlaceAPI::GetInPlace
+          (theDestinationShape, theSourceShape, aGIP)) {
     return Standard_False;
   }
 
   const GEOMAlgo_DataMapOfShapeMapOfShape &aShapesIn = aGIP.ShapesIn();
   const GEOMAlgo_DataMapOfShapeMapOfShape &aShapesOn = aGIP.ShapesOn();
+  Standard_Integer                         i;
   Standard_Integer                         j;
   Standard_Integer                         aNbShapes = theSourceIndices.Extent();
 
-  for (j = 1; j <= aNbShapes; ++j) {
-    const TopoDS_Shape   &aSource = theSourceIndices.FindKey(j);
+  for (i = 1; i <= aNbShapes; ++i) {
+    const TopoDS_Shape   &aSource = theSourceIndices.FindKey(i);
     TopTools_ListOfShape  aListShapes2;
     TopTools_MapOfShape   aMapShapes2;
 
-    for (i = 0; i < 2; ++i) {
+    for (j = 0; j < 2; ++j) {
       const GEOMAlgo_DataMapOfShapeMapOfShape &aShapes2 =
-                    i == 0 ? aShapesIn : aShapesOn;
+                    j == 0 ? aShapesIn : aShapesOn;
 
       if (aShapes2.IsBound(aSource)) {
         const TopTools_MapOfShape &aMapShapesDest =
index 4541b6ffa37923c7eb655e662830d24d1ceae9ed..602bc2ddc8d89ce65c8674a8bf03a81619d12b8e 100644 (file)
 #ifndef _GEOMImpl_CopyDriver_HeaderFile
 #define _GEOMImpl_CopyDriver_HeaderFile
 
-#ifndef _TColStd_SequenceOfExtendedString_HeaderFile
-#include <TColStd_SequenceOfExtendedString.hxx>
-#endif
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_GUID_HeaderFile
-#include <Standard_GUID.hxx>
-#endif 
-
-#ifndef _TFunction_Driver_HeaderFile
-#include <TFunction_Driver.hxx>
-#endif
-#ifndef _TFunction_Logbook_HeaderFile
-#include <TFunction_Logbook.hxx>
-#endif
-#ifndef _Standard_CString_HeaderFile
-#include <Standard_CString.hxx>
-#endif
-
-class TColStd_SequenceOfExtendedString;
 class TopoDS_Shape;
 class TopTools_IndexedDataMapOfShapeListOfShape;
 class TopTools_IndexedMapOfShape;
+class Standard_GUID;
 
 
 #include "GEOM_BaseDriver.hxx"
index ac43bf39b4278d02b411360a679cc71b0ca7842e..96ec73c872c58b169f8fa98a386ab0a4b59bcc00 100644 (file)
 
 #include "GEOMAlgo_ClsfBox.hxx"
 #include "GEOMAlgo_ClsfSolid.hxx"
-//#include "GEOMAlgo_CoupleOfShapes.hxx"
 #include "GEOMAlgo_FinderShapeOn1.hxx"
 #include "GEOMAlgo_FinderShapeOnQuad.hxx"
 #include "GEOMAlgo_FinderShapeOn2.hxx"
 #include "GEOMAlgo_GetInPlace.hxx"
 #include "GEOMAlgo_GetInPlaceAPI.hxx"
 #include "GEOMAlgo_GlueDetector.hxx"
-//#include "GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx"
-//#include "GEOMAlgo_ListOfCoupleOfShapes.hxx"
-
-//#include <Basics_OCCTVersion.hxx>
 
 #include <utilities.h>
-//#include <OpUtil.hxx>
-//#include <Utils_ExceptHandlers.hxx>
 
 #include <BRepAdaptor_Curve.hxx>
 #include <BRepAdaptor_Surface.hxx>
-#include <BRepBndLib.hxx>
-//#include <BRepBuilderAPI_MakeVertex.hxx>
-//#include <BRepClass3d_SolidClassifier.hxx>
-//#include <BRepClass_FaceClassifier.hxx>
-#include <BRepExtrema_DistShapeShape.hxx>
-#include <BRepExtrema_ExtCF.hxx>
-#include <BRepGProp.hxx>
-#include <BRepMesh_IncrementalMesh.hxx>
 #include <BRepTools.hxx>
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
-#include <Bnd_Box.hxx>
-#include <GEOMImpl_IMeasure.hxx>
-#include <GEOMImpl_MeasureDriver.hxx>
-#include <GProp_GProps.hxx>
-#include <Geom2d_Curve.hxx>
-#include <GeomAdaptor_Surface.hxx>
 #include <GeomLib_Tool.hxx>
 #include <Geom_CylindricalSurface.hxx>
 #include <Geom_Plane.hxx>
 #include <Geom_SphericalSurface.hxx>
 #include <Geom_Surface.hxx>
 #include <Precision.hxx>
-#include <TColStd_Array1OfReal.hxx>
 #include <TColStd_HArray1OfInteger.hxx>
-#include <TColStd_ListIteratorOfListOfInteger.hxx>
-#include <TColStd_ListOfInteger.hxx>
 #include <TDF_Tool.hxx>
 #include <TDataStd_Integer.hxx>
-#include <TDataStd_IntegerArray.hxx>
 #include <TDataStd_ListIteratorOfListOfExtendedString.hxx>
-#include <TFunction_Driver.hxx>
-#include <TFunction_DriverTable.hxx>
-#include <TFunction_Logbook.hxx>
-#include <TopAbs.hxx>
 #include <TopExp.hxx>
 #include <TopExp_Explorer.hxx>
-#include <TopLoc_Location.hxx>
-#include <TopTools_Array1OfShape.hxx>
 #include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
 #include <TopTools_IndexedMapOfShape.hxx>
 #include <TopTools_ListIteratorOfListOfShape.hxx>
 #include <TopoDS_Solid.hxx>
 #include <TopoDS_Vertex.hxx>
 #include <gp_Cylinder.hxx>
-#include <gp_Lin.hxx>
 #include <gp_Pnt.hxx>
 
 #include <vector>
-#include <algorithm>
-#include <functional>
 
-#include <Standard_NullObject.hxx>
 #include <Standard_Failure.hxx>
 #include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
 
@@ -3791,130 +3756,6 @@ Handle(TColStd_HSequenceOfInteger)
   return aSeqOfIDs;
 }
 
-//=============================================================================
-/*!
- *  GetInPlaceOfShape
- */
-//=============================================================================
-static bool GetInPlaceOfShape (const Handle(GEOM_Function)& theWhereFunction,
-                               const TopTools_IndexedMapOfShape& theWhereIndices,
-                               const TopoDS_Shape& theWhat,
-                               TColStd_ListOfInteger& theModifiedList)
-{
-  if (theWhereFunction.IsNull() || theWhat.IsNull()) return false;
-
-  if (theWhereIndices.Contains(theWhat)) {
-    // entity was not changed by the operation
-    Standard_Integer aWhatIndex = theWhereIndices.FindIndex(theWhat);
-    theModifiedList.Append(aWhatIndex);
-    return true;
-  }
-
-  // try to find in history
-  TDF_Label aHistoryLabel = theWhereFunction->GetHistoryEntry(Standard_False);
-
-  // search in history for all argument shapes
-  Standard_Boolean isFound = Standard_False;
-  Standard_Boolean isGood = Standard_False;
-
-  TDF_LabelSequence aLabelSeq;
-  theWhereFunction->GetDependency(aLabelSeq);
-  Standard_Integer nbArg = aLabelSeq.Length();
-
-  for (Standard_Integer iarg = 1; iarg <= nbArg && !isFound; iarg++) {
-
-    TDF_Label anArgumentRefLabel = aLabelSeq.Value(iarg);
-
-    Handle(GEOM_Object) anArgumentObject = GEOM_Object::GetReferencedObject(anArgumentRefLabel);
-    TopoDS_Shape anArgumentShape = anArgumentObject->GetValue();
-
-    TopTools_IndexedMapOfShape anArgumentIndices;
-    TopExp::MapShapes(anArgumentShape, anArgumentIndices);
-
-    if (anArgumentIndices.Contains(theWhat)) {
-      isFound = Standard_True;
-      Standard_Integer aWhatIndex = anArgumentIndices.FindIndex(theWhat);
-
-      // Find corresponding label in history
-      TDF_Label anArgumentHistoryLabel =
-        theWhereFunction->GetArgumentHistoryEntry(anArgumentRefLabel, Standard_False);
-      if (anArgumentHistoryLabel.IsNull()) {
-        // Lost History of operation argument. Possibly, all its entities was removed.
-        isGood = Standard_True;
-      }
-      else {
-        TDF_Label aWhatHistoryLabel = anArgumentHistoryLabel.FindChild(aWhatIndex, Standard_False);
-
-        if (aWhatHistoryLabel.IsNull()) {
-          // Removed entity ? Compound ? Compsolid ? Shell ? Wire
-          isGood = Standard_False;
-        } else {
-          Handle(TDataStd_IntegerArray) anIntegerArray;
-          if (!aWhatHistoryLabel.FindAttribute(TDataStd_IntegerArray::GetID(), anIntegerArray)) {
-            //Error: Empty modifications history for the sought shape.
-            isGood = Standard_False;
-          }
-          else {
-            isGood = Standard_True;
-            Standard_Integer imod, aModifLen = anIntegerArray->Array()->Length();
-            for (imod = 1; imod <= aModifLen; imod++) {
-              theModifiedList.Append(anIntegerArray->Array()->Value(imod));
-            }
-          }
-        }
-      }
-    }
-  }
-
-  isFound = isGood;
-
-  if (!isFound) {
-    // try compound/compsolid/shell/wire element by element
-    bool isFoundAny = false;
-    TopTools_MapOfShape mapShape;
-
-    if (theWhat.ShapeType() == TopAbs_COMPOUND ||
-        theWhat.ShapeType() == TopAbs_COMPSOLID) {
-      // recursive processing of compound/compsolid
-      TopoDS_Iterator anIt (theWhat, Standard_True, Standard_True);
-      for (; anIt.More(); anIt.Next()) {
-        if (mapShape.Add(anIt.Value())) {
-          TopoDS_Shape curWhat = anIt.Value();
-          isFoundAny = GetInPlaceOfShape(theWhereFunction, theWhereIndices, curWhat, theModifiedList);
-          if (isFoundAny) isFound = Standard_True;
-        }
-      }
-    }
-    else if (theWhat.ShapeType() == TopAbs_SHELL) {
-      // try to replace a shell by its faces images
-      TopExp_Explorer anExp (theWhat, TopAbs_FACE);
-      for (; anExp.More(); anExp.Next()) {
-        if (mapShape.Add(anExp.Current())) {
-          TopoDS_Shape curWhat = anExp.Current();
-          isFoundAny = GetInPlaceOfShape(theWhereFunction, theWhereIndices, curWhat, theModifiedList);
-          if (isFoundAny) isFound = Standard_True;
-        }
-      }
-    }
-    else if (theWhat.ShapeType() == TopAbs_WIRE) {
-      // try to replace a wire by its edges images
-      TopExp_Explorer anExp (theWhat, TopAbs_EDGE);
-      for (; anExp.More(); anExp.Next()) {
-        if (mapShape.Add(anExp.Current())) {
-          TopoDS_Shape curWhat = anExp.Current();
-          isFoundAny = GetInPlaceOfShape(theWhereFunction, theWhereIndices, curWhat, theModifiedList);
-          if (isFoundAny) isFound = Standard_True;
-        }
-      }
-    }
-    else {
-      // Removed entity
-    }
-  }
-
-  return isFound;
-}
-
 //=============================================================================
 /*!
  *  case GetInPlace:
@@ -3936,47 +3777,10 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::GetInPlace (Handle(GEOM_Object)
     return NULL;
   }
 
-  // Compute confusion tolerance.
-  Standard_Real    aTolConf = Precision::Confusion();
-  Standard_Integer i;
-
-  for (i = 0; i < 2; ++i) {
-    TopExp_Explorer anExp(i == 0 ? aWhere : aWhat, TopAbs_VERTEX);
-
-    for (; anExp.More(); anExp.Next()) {
-      const TopoDS_Vertex aVtx = TopoDS::Vertex(anExp.Current());
-      const Standard_Real aTolVtx = BRep_Tool::Tolerance(aVtx);
-
-      if (aTolVtx > aTolConf) {
-        aTolConf = aTolVtx;
-      }
-    }
-  }
-
-  // Compute mass tolerance.
-  Bnd_Box       aBoundingBox;
-  Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
-  Standard_Real aMassTol;
-
-  BRepBndLib::Add(aWhere, aBoundingBox);
-  BRepBndLib::Add(aWhat,  aBoundingBox);
-  aBoundingBox.Get(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);
-  aMassTol = Max(aXmax - aXmin, aYmax - aYmin);
-  aMassTol = Max(aMassTol, aZmax - aZmin);
-  aMassTol *= aTolConf;
-
   // Searching for the sub-shapes inside the ShapeWhere shape
   GEOMAlgo_GetInPlace aGIP;
-  aGIP.SetTolerance(aTolConf);
-  aGIP.SetTolMass(aMassTol);
-  aGIP.SetTolCG(aTolConf);
-
-  aGIP.SetArgument(aWhat);
-  aGIP.SetShapeWhere(aWhere);
 
-  aGIP.Perform();
-  int iErr = aGIP.ErrorStatus();
-  if (iErr) {
+  if (!GEOMAlgo_GetInPlaceAPI::GetInPlace(aWhere, aWhat, aGIP)) {
     SetErrorCode("Error in GEOMAlgo_GetInPlace");
     return NULL;
   }
index 68543ebec4027d28d8cf2eb0c6f5f17a6803a281..e536ca3c0b735dddeeda535a1c668f5bef587598 100644 (file)
 
 #include "GEOMAlgo_State.hxx"
 
-#include <TopoDS_Shape.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <NCollection_DataMap.hxx>
 #include <TColStd_HSequenceOfTransient.hxx>
 #include <TColStd_HSequenceOfInteger.hxx>
 
-#include <Handle_Geom_Surface.hxx>
-
-#include <gp_Pnt.hxx>
+#include <Geom_Surface.hxx>
 
 #include <list>
-#include <functional>
 
 class GEOM_Engine;
 class Handle(GEOM_Object);
 class Handle(TColStd_HArray1OfInteger);
+class TopoDS_Shape;
 
 class GEOMImpl_IShapesOperations : public GEOM_IOperations
 {