occ - apply maxh setting to all children

This commit is contained in:
mhochsteger@cerbsim.com 2021-09-13 12:48:10 +02:00
parent 8b36df94a1
commit 0a15ce5c2b

View File

@ -792,7 +792,12 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m)
}, },
[](TopoDS_Shape& self, double val) [](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") }, "maximal mesh-size for shape")
.def_property("col", [](const TopoDS_Shape & self) { .def_property("col", [](const TopoDS_Shape & self) {