set global mesh in occ before generatemesh

to visualize meshing
This commit is contained in:
Christopher Lackner 2022-01-18 18:23:35 +01:00
parent a6a7d278dc
commit 6065fe40f4

View File

@ -265,10 +265,10 @@ DLL_HEADER void ExportNgOCC(py::module &m)
geo->SetOCCParameters(occparam);
auto mesh = make_shared<Mesh>();
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,