Element2D exported to Python

This commit is contained in:
Christoph Wintersteiger 2014-10-01 13:16:34 +00:00
parent 39ae75500a
commit 2f4ff3ab2b

View File

@ -114,7 +114,18 @@ void ExportNetgenMeshing()
return li;
}))
;
bp::class_<Element2d>("Element2D")
.add_property("index", &Element2d::GetIndex, &Element2d::SetIndex)
.add_property("vertices",
FunctionPointer([](const Element2d & self) -> bp::list
{
bp::list li;
for (int i = 0; i < self.GetNV(); i++)
li.append(self[i]);
return li;
}))
;
ExportArray<Element>();
ExportArray<Element2d>();
ExportArray<MeshPoint,PointIndex::BASE,PointIndex>();