From 97447d681f8beca043a716d4f66c226bb23d5681 Mon Sep 17 00:00:00 2001 From: Joachim Schoeberl Date: Sat, 14 Aug 2021 13:01:40 +0200 Subject: [PATCH] preserve also face and edge properties in Glue --- libsrc/occ/python_occ_shapes.cpp | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/libsrc/occ/python_occ_shapes.cpp b/libsrc/occ/python_occ_shapes.cpp index c936f192..cf2f1e58 100644 --- a/libsrc/occ/python_occ_shapes.cpp +++ b/libsrc/occ/python_occ_shapes.cpp @@ -1157,20 +1157,14 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m) #ifdef OCC_HAVE_HISTORY Handle(BRepTools_History) history = builder.History (); - for (auto & s : shapes) - for (TopExp_Explorer e(s, TopAbs_SOLID); e.More(); e.Next()) - { - auto prop = OCCGeometry::global_shape_properties[e.Current().TShape()]; - for (auto mods : history->Modified(e.Current())) - OCCGeometry::global_shape_properties[mods.TShape()].Merge(prop); - } - /* - { - auto name = OCCGeometry::global_shape_names[e.Current().TShape()]; - for (auto mods : history->Modified(e.Current())) - OCCGeometry::global_shape_names[mods.TShape()] = name; - } - */ + for (auto typ : { TopAbs_SOLID, TopAbs_FACE, TopAbs_EDGE }) + for (auto & s : shapes) + for (TopExp_Explorer e(s, typ); e.More(); e.Next()) + { + auto prop = OCCGeometry::global_shape_properties[e.Current().TShape()]; + for (auto mods : history->Modified(e.Current())) + OCCGeometry::global_shape_properties[mods.TShape()].Merge(prop); + } #endif // OCC_HAVE_HISTORY return builder.Shape();