mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-26 21:00:34 +05:00
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:
commit
38b6f377ff
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user