From f0656512277ba9a84d0586c30b1786e1cc689762 Mon Sep 17 00:00:00 2001 From: Christopher Lackner Date: Wed, 1 Aug 2018 15:53:01 +0200 Subject: [PATCH] set global geometry when occ file is loaded --- libsrc/occ/python_occ.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) {