Path.Area: added Sections python attribute

This commit is contained in:
Zheng, Lei
2017-01-24 14:37:52 +08:00
parent cd4d4f3cf4
commit 7d04c2188c
3 changed files with 20 additions and 0 deletions

View File

@@ -295,6 +295,14 @@ PyObject* AreaPy::getParamsDesc(PyObject *args, PyObject *keywds)
return dict;
}
Py::List AreaPy::getSections(void) const {
Py::List ret;
Area *area = getAreaPtr();
for(size_t i=0,count=area->getSectionCount(); i<count;++i)
ret.append(Part::shape2pyshape(getAreaPtr()->getShape(i)));
return ret;
}
// custom attributes get/set
PyObject *AreaPy::getCustomAttributes(const char* /*attr*/) const