From ee476e154d750ecd8aa4b924c5a21e22d49b82fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Sch=C3=B6berl?= Date: Mon, 26 Jun 2017 23:26:09 +0200 Subject: [PATCH] set MeshPoint coordinates --- libsrc/meshing/python_mesh.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libsrc/meshing/python_mesh.cpp b/libsrc/meshing/python_mesh.cpp index 7315bc7b..cd295228 100644 --- a/libsrc/meshing/python_mesh.cpp +++ b/libsrc/meshing/python_mesh.cpp @@ -195,6 +195,11 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m) throw py::index_error(); return self[index]; })) + .def("__setitem__", FunctionPointer([](MeshPoint & self, int index, double val) { + if(index<0 || index>2) + throw py::index_error(); + self(index) = val; + })) ; py::class_(m, "Element3D")