[occ] create ListOfShape from list of shapes

This commit is contained in:
Christopher Lackner 2022-06-08 20:52:51 +02:00
parent 8f33f4fed8
commit 03e21d5c5f

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()));