diff --git a/libsrc/occ/python_occ.cpp b/libsrc/occ/python_occ.cpp index e9c7d3b3..bfb39cac 100644 --- a/libsrc/occ/python_occ.cpp +++ b/libsrc/occ/python_occ.cpp @@ -265,10 +265,10 @@ DLL_HEADER void ExportNgOCC(py::module &m) geo->SetOCCParameters(occparam); auto mesh = make_shared(); mesh->SetGeometry(geo); + SetGlobalMesh(mesh); auto result = geo->GenerateMesh(mesh, mp); if(result != 0) throw Exception("Meshing failed!"); - SetGlobalMesh(mesh); ng_geometry = geo; return mesh; }, py::arg("mp") = nullptr,