export localh set/get from mesh

This commit is contained in:
Christopher Lackner 2024-05-24 08:30:24 +02:00
parent 35feeff7ab
commit e404ce737b

View File

@ -88,6 +88,8 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
.def("__bool__", []( NGDummyArgument &self ) { return false; } )
;
py::class_<LocalH, shared_ptr<LocalH>>(m, "LocalH");
py::class_<Point<2>> (m, "Point2d")
.def(py::init<double,double>())
.def(py::init( [] (std::pair<double,double> xy)
@ -1249,7 +1251,11 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
else mp.optsteps3d = 5;
OptimizeVolume (mp, self);
}, py::arg("mp"), py::call_guard<py::gil_scoped_release>())
.def("SetLocalH",[](Mesh& self, shared_ptr<LocalH> 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);