Salome HOME
Initial (compilation) porting to SALOME 8.5.0 current on Debian 8
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_UnifySameDomain.cpp
index 8e8238aafc3e39d5d1fe70c2aac65f73b403c9da..356c15be15ba47b6bc755a3c6964d22e25fe07d2 100644 (file)
@@ -96,11 +96,13 @@ void GeomAlgoAPI_UnifySameDomain::modified(const std::shared_ptr<GeomAPI_Shape>
   const TopoDS_Shape& aShape = theShape->impl<TopoDS_Shape>();
   const ShapeUpgrade_UnifySameDomain& aUnifyAlgo = this->impl<ShapeUpgrade_UnifySameDomain>();
 
-  TopoDS_Shape aModifiedShape = aUnifyAlgo.Generated(aShape);
+  const TopTools_ListOfShape& aMList = aUnifyAlgo.History()->Generated(aShape);
+  for(TopTools_ListIteratorOfListOfShape aModified(aMList); aModified.More(); aModified.Next()) {
 
-  for(TopExp_Explorer anExp(aModifiedShape, aShape.ShapeType()); anExp.More(); anExp.Next()) {
-    GeomShapePtr aGeomShape(new GeomAPI_Shape());
-    aGeomShape->setImpl(new TopoDS_Shape(anExp.Current()));
-    theHistory.push_back(aGeomShape);
+    for(TopExp_Explorer anExp(aModified.Value(), aShape.ShapeType()); anExp.More(); anExp.Next()) {
+      GeomShapePtr aGeomShape(new GeomAPI_Shape());
+      aGeomShape->setImpl(new TopoDS_Shape(anExp.Current()));
+      theHistory.push_back(aGeomShape);
+    }
   }
 }