+ allow to set deflection of a mesh with exportStl

This commit is contained in:
wmayer
2014-03-27 10:41:25 +01:00
parent 7bcb9919b7
commit fa14dec3fa
3 changed files with 10 additions and 7 deletions

View File

@@ -424,12 +424,13 @@ PyObject* TopoShapePy::importBrepFromString(PyObject *args)
PyObject* TopoShapePy::exportStl(PyObject *args)
{
char* filename;
if (!PyArg_ParseTuple(args, "s", &filename))
double deflection = 0;
if (!PyArg_ParseTuple(args, "s|d", &filename, &deflection))
return NULL;
try {
// write stl file
getTopoShapePtr()->exportStl(filename);
getTopoShapePtr()->exportStl(filename, deflection);
}
catch (const Base::Exception& e) {
PyErr_SetString(PyExc_Exception,e.what());