diff --git a/libsrc/occ/python_occ.cpp b/libsrc/occ/python_occ.cpp index 8662ad10..3d95bcd6 100644 --- a/libsrc/occ/python_occ.cpp +++ b/libsrc/occ/python_occ.cpp @@ -113,7 +113,8 @@ DLL_HEADER void ExportNgOCC(py::module &m) ifstream ist(filename); OCCGeometry * instance = new OCCGeometry(); instance = LoadOCC_STEP(filename.c_str()); - return shared_ptr(instance, NOOP_Deleter); + ng_geometry = shared_ptr(instance, NOOP_Deleter); + return ng_geometry; }),py::call_guard()); m.def("GenerateMesh", FunctionPointer([] (shared_ptr geo, MeshingParameters ¶m) {