From 0a15ce5c2b031c828960d8c3b53c188c05fd3140 Mon Sep 17 00:00:00 2001 From: "mhochsteger@cerbsim.com" Date: Mon, 13 Sep 2021 12:48:10 +0200 Subject: [PATCH] occ - apply maxh setting to all children --- libsrc/occ/python_occ_shapes.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libsrc/occ/python_occ_shapes.cpp b/libsrc/occ/python_occ_shapes.cpp index ffdc1387..aadda7d8 100644 --- a/libsrc/occ/python_occ_shapes.cpp +++ b/libsrc/occ/python_occ_shapes.cpp @@ -792,7 +792,12 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m) }, [](TopoDS_Shape& self, double val) { - OCCGeometry::global_shape_properties[self.TShape()].maxh = val; + for (auto typ : { TopAbs_SOLID, TopAbs_FACE, TopAbs_EDGE }) + for (TopExp_Explorer e(self, typ); e.More(); e.Next()) + { + auto & maxh = OCCGeometry::global_shape_properties[e.Current().TShape()].maxh; + maxh = min2(val, maxh); + } }, "maximal mesh-size for shape") .def_property("col", [](const TopoDS_Shape & self) {