Sketcher: Python command to delete all internal geometry and constraints of an sketch

This commit is contained in:
Abdullah Tahiri
2017-11-05 07:29:19 +01:00
committed by wmayer
parent 11a6edc7b9
commit 6210b602de
4 changed files with 41 additions and 0 deletions

View File

@@ -213,6 +213,23 @@ PyObject* SketchObjectPy::delGeometry(PyObject *args)
Py_Return;
}
PyObject* SketchObjectPy::deleteAllGeometry(PyObject *args)
{
if (!PyArg_ParseTuple(args, ""))
return 0;
if (this->getSketchObjectPtr()->deleteAllGeometry()) {
std::stringstream str;
str << "Unable to delete Geometry";
PyErr_SetString(PyExc_ValueError, str.str().c_str());
return 0;
}
Py_Return;
}
PyObject* SketchObjectPy::toggleConstruction(PyObject *args)
{
int Index;