- const TopTools_ListOfShape& aMList = aUnifyAlgo.History()->Generated(aShape);
- for(TopTools_ListIteratorOfListOfShape aModified(aMList); aModified.More(); aModified.Next()) {
-
- 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);
+ for (int aIsModified = 0; aIsModified <= 1; aIsModified++) {
+ const TopTools_ListOfShape& aMList = aIsModified ?
+ aUnifyAlgo.History()->Modified(aShape) : aUnifyAlgo.History()->Generated(aShape);
+ for (TopTools_ListIteratorOfListOfShape aModified(aMList); aModified.More(); aModified.Next()) {
+ 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);
+ }