Part: Allow to disable progress bar in brep string reader

This commit is contained in:
Yorik van Havre
2018-07-19 11:57:07 -03:00
parent cc0fb2a5a9
commit c93ff200ca
4 changed files with 16 additions and 10 deletions

View File

@@ -513,13 +513,14 @@ PyObject* TopoShapePy::importBinary(PyObject *args)
PyObject* TopoShapePy::importBrepFromString(PyObject *args)
{
char* input;
if (!PyArg_ParseTuple(args, "s", &input))
int indicator=1;
if (!PyArg_ParseTuple(args, "s|i", &input, &indicator))
return NULL;
try {
// read brep
std::stringstream str(input);
getTopoShapePtr()->importBrep(str);
getTopoShapePtr()->importBrep(str,indicator);
}
catch (const Base::Exception& e) {
PyErr_SetString(PartExceptionOCCError,e.what());