diff --git a/libsrc/meshing/python_mesh.cpp b/libsrc/meshing/python_mesh.cpp index b6a9675e..32b8834d 100644 --- a/libsrc/meshing/python_mesh.cpp +++ b/libsrc/meshing/python_mesh.cpp @@ -105,14 +105,11 @@ DLL_HEADER void ExportNetgenMeshing() .def(bp::init>()) .def("__str__", &ToString) .def("__repr__", &ToString) - .add_property("p", FunctionPointer([](const MeshPoint & self) - { - bp::list l; - l.append ( self[0] ); - l.append ( self[1] ); - l.append ( self[2] ); - return bp::tuple(l); - })) + .def("__getitem__", FunctionPointer([](const MeshPoint & self, int index) { + if(index<0 || index>2) + bp::exec("raise IndexError()\n"); + return self[index]; + })) ; bp::class_("Element3D")