add simulate function to MakePipeShell

This commit is contained in:
tomate44
2018-02-26 16:24:34 +01:00
committed by Yorik van Havre
parent 22ee06de84
commit dd49ee27fd
2 changed files with 33 additions and 0 deletions

View File

@@ -499,6 +499,31 @@ PyObject* BRepOffsetAPI_MakePipeShellPy::setForceApproxC1(PyObject *args)
}
PyObject* BRepOffsetAPI_MakePipeShellPy::simulate(PyObject *args)
{
int nbsec;
if (!PyArg_ParseTuple(args, "i",&nbsec))
return 0;
try {
TopTools_ListOfShape list;
this->getBRepOffsetAPI_MakePipeShellPtr()->Simulate(nbsec, list);
Py::List shapes;
TopTools_ListIteratorOfListOfShape it;
for (it.Initialize(list); it.More(); it.Next()) {
const TopoDS_Shape& s = it.Value();
shapes.append(Py::asObject(new TopoShapePy(new TopoShape(s))));
}
return Py::new_reference_to(shapes);
}
catch (Standard_Failure& e) {
PyErr_SetString(PartExceptionOCCError, e.GetMessageString());
return 0;
}
}
PyObject *BRepOffsetAPI_MakePipeShellPy::getCustomAttributes(const char* ) const
{
return 0;