diff --git a/libsrc/meshing/python_mesh.cpp b/libsrc/meshing/python_mesh.cpp index 8b6dd1c8..2c42d537 100644 --- a/libsrc/meshing/python_mesh.cpp +++ b/libsrc/meshing/python_mesh.cpp @@ -857,24 +857,17 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m) self.SetMaxHDomain(maxh); }) .def ("GenerateVolumeMesh", - [](Mesh & self, py::object pymp) + [](Mesh & self, py::kwargs kwargs) { - cout << "generate vol mesh" << endl; - MeshingParameters mp; { py::gil_scoped_acquire acquire; - if (py::extract(pymp).check()) - mp = py::extract(pymp)(); - else - { - mp.optsteps3d = 5; - } + mp = CreateMPfromKwargs(kwargs); } MeshVolume (mp, self); OptimizeVolume (mp, self); - }, - py::arg("mp")=NGDummyArgument(),py::call_guard()) + }, meshingparameter_description.c_str(), + py::call_guard()) .def ("OptimizeVolumeMesh", [](Mesh & self) { diff --git a/tests/pytest/test_pickling.py b/tests/pytest/test_pickling.py index e6059532..17f22163 100644 --- a/tests/pytest/test_pickling.py +++ b/tests/pytest/test_pickling.py @@ -52,7 +52,7 @@ def test_pickle_occ(): except: import pytest pytest.skip("can't import occ") - geo = OCCGeometry("../../tutorials/frame.step") + geo = occ.OCCGeometry("../../tutorials/frame.step") geo_dump = pickle.dumps(geo) geo2 = pickle.loads(geo_dump) vd1 = geo._visualizationData()