From 74eff694107913e9ae40087550443c62687a71af Mon Sep 17 00:00:00 2001 From: Joachim Schoeberl Date: Thu, 31 Aug 2023 12:13:38 +0200 Subject: [PATCH] singular edges/points to Python --- 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 0b114013..1dbef786 100644 --- a/libsrc/meshing/python_mesh.cpp +++ b/libsrc/meshing/python_mesh.cpp @@ -383,7 +383,10 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m) if(index<0 || index>2) throw py::index_error(); self(index) = val; - }) + }) + .def_property("singular", + [](const MeshPoint & pnt) { return pnt.Singularity(); }, + [](MeshPoint & pnt, double sing) { pnt.Singularity(sing); }) ; py::class_(m, "Element3D") @@ -608,6 +611,9 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m) { return self.edgenr; })) + .def_property("singular", + [](const Segment & seg) { return seg.singedge_left; }, + [](Segment & seg, double sing) { seg.singedge_left = sing; seg.singedge_right=sing; }) ; if(ngcore_have_numpy)