Merge branch 'getitemMeshPoint' into 'master'

Getitem mesh point

getitem for more intuitive access to point coordinates

See merge request !7
This commit is contained in:
Joachim Schöberl 2016-08-06 13:48:04 +02:00
commit 38b6f377ff

View File

@ -113,6 +113,11 @@ DLL_HEADER void ExportNetgenMeshing()
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_<Element>("Element3D")