From 1d67567c02c867577a56818d1a8cf6f3a066ea08 Mon Sep 17 00:00:00 2001 From: Christopher Lackner Date: Thu, 16 Nov 2023 14:00:37 +0100 Subject: [PATCH] export geom info of 2d elements --- libsrc/meshing/python_mesh.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libsrc/meshing/python_mesh.cpp b/libsrc/meshing/python_mesh.cpp index 97b16461..5f6ae7eb 100644 --- a/libsrc/meshing/python_mesh.cpp +++ b/libsrc/meshing/python_mesh.cpp @@ -512,6 +512,13 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m) .def_property("index", &Element2d::GetIndex, &Element2d::SetIndex) .def_property("curved", &Element2d::IsCurved, &Element2d::SetCurved) .def_property("refine", &Element2d::TestRefinementFlag, &Element2d::SetRefinementFlag) + .def_property_readonly("geominfo", [](const Element2d& self) -> py::list + { + py::list li; + for (const auto &pgi : self.GeomInfo()) + li.append(py::make_tuple(pgi.trignum, pgi.u, pgi.v)); + return li; + }) .def_property_readonly("vertices", FunctionPointer([](const Element2d & self) -> py::list {