Merge branch 'listofshape_from_list' into 'master'

[occ] create ListOfShape from list of shapes

See merge request ngsolve/netgen!506
This commit is contained in:
Lackner, Christopher 2022-06-09 10:07:38 +02:00
commit 6b12050fd1

View File

@ -1544,6 +1544,7 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m)
}; };
py::class_<ListOfShapes> (m, "ListOfShapes") py::class_<ListOfShapes> (m, "ListOfShapes")
.def(py::init<vector<TopoDS_Shape>>())
.def("__iter__", [](ListOfShapes &s) { .def("__iter__", [](ListOfShapes &s) {
return py::make_iterator(ListOfShapesIterator(&*s.begin()), return py::make_iterator(ListOfShapesIterator(&*s.begin()),
ListOfShapesIterator(&*s.end())); ListOfShapesIterator(&*s.end()));