From e404ce737bd87eff286f0553225073eededfe453 Mon Sep 17 00:00:00 2001 From: Christopher Lackner Date: Fri, 24 May 2024 08:30:24 +0200 Subject: [PATCH] export localh set/get from mesh --- libsrc/meshing/python_mesh.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libsrc/meshing/python_mesh.cpp b/libsrc/meshing/python_mesh.cpp index f93ed62f..3a652e02 100644 --- a/libsrc/meshing/python_mesh.cpp +++ b/libsrc/meshing/python_mesh.cpp @@ -87,6 +87,8 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m) py::class_(m, "NGDummyArgument") .def("__bool__", []( NGDummyArgument &self ) { return false; } ) ; + + py::class_>(m, "LocalH"); py::class_> (m, "Point2d") .def(py::init()) @@ -1249,7 +1251,11 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m) else mp.optsteps3d = 5; OptimizeVolume (mp, self); }, py::arg("mp"), py::call_guard()) - + .def("SetLocalH",[](Mesh& self, shared_ptr localh, int layer) + { + self.SetLocalH(localh, layer); + }, py::arg("localh"), py::arg("layer")=1) + .def("GetLocalH", &Mesh::GetLocalH) .def ("OptimizeMesh2d", [](Mesh & self, MeshingParameters* pars, int faceindex) { self.CalcLocalH(0.5);