]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/FeaturesPlugin/FeaturesPlugin_BooleanFuse.cpp
Salome HOME
Extract ShapeHierarchy as a separate object
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_BooleanFuse.cpp
index a7a1b0cc10643c378d7fc512f4ed984a6b6ac3be..77d5bcefd8a04c5d50aa76ab55bcaf930a492a1f 100644 (file)
@@ -67,7 +67,7 @@ void FeaturesPlugin_BooleanFuse::initAttributes()
 void FeaturesPlugin_BooleanFuse::execute()
 {
   std::string anError;
-  ObjectHierarchy anObjectsHierarchy, aToolsHierarchy;
+  GeomAPI_ShapeHierarchy anObjectsHierarchy, aToolsHierarchy;
   ListOfShape aPlanes;
 
   bool isSimpleCreation = false;
@@ -90,9 +90,9 @@ void FeaturesPlugin_BooleanFuse::execute()
 
   ListOfShape anObjects, aTools, anEdgesAndFaces;
   // all objects except edges and faces
-  anObjectsHierarchy.ObjectsByType(anEdgesAndFaces, anObjects,
+  anObjectsHierarchy.objectsByType(anEdgesAndFaces, anObjects,
                                    GeomAPI_Shape::FACE, GeomAPI_Shape::EDGE);
-  aToolsHierarchy.ObjectsByType(anEdgesAndFaces, aTools,
+  aToolsHierarchy.objectsByType(anEdgesAndFaces, aTools,
                                 GeomAPI_Shape::FACE, GeomAPI_Shape::EDGE);
 
   if ((anObjects.size() + aTools.size() + anEdgesAndFaces.size()) < 2) {
@@ -113,18 +113,18 @@ void FeaturesPlugin_BooleanFuse::execute()
   // in boolean operation and will be added to result.
   bool isProcessCompsolid = !isSimpleCreation || !aFuseVersion.empty();
   ListOfShape aShapesToAdd;
-  for (ObjectHierarchy::Iterator anObjectsIt = anObjectsHierarchy.Begin();
-       isProcessCompsolid && anObjectsIt != anObjectsHierarchy.End();
+  for (GeomAPI_ShapeHierarchy::iterator anObjectsIt = anObjectsHierarchy.begin();
+       isProcessCompsolid && anObjectsIt != anObjectsHierarchy.end();
        ++anObjectsIt) {
     GeomShapePtr anObject = *anObjectsIt;
-    GeomShapePtr aParent = anObjectsHierarchy.Parent(anObject, false);
+    GeomShapePtr aParent = anObjectsHierarchy.parent(anObject, false);
 
     if (aParent && aParent->shapeType() == GeomAPI_Shape::COMPSOLID) {
       // mark all subs of this parent as precessed to avoid handling twice
-      aParent = anObjectsHierarchy.Parent(anObject);
+      aParent = anObjectsHierarchy.parent(anObject);
 
       ListOfShape aUsed, aNotUsed;
-      anObjectsHierarchy.SplitCompound(aParent, aUsed, aNotUsed);
+      anObjectsHierarchy.splitCompound(aParent, aUsed, aNotUsed);
       aShapesToAdd.insert(aShapesToAdd.end(), aNotUsed.begin(), aNotUsed.end());
     }
   }