Sketcher: Python command to delete all the constraints at once

This commit is contained in:
Abdullah Tahiri
2018-07-14 07:32:23 +02:00
committed by wmayer
parent 0024d1b0c4
commit cd5aa8975e
2 changed files with 20 additions and 1 deletions

View File

@@ -217,7 +217,7 @@ PyObject* SketchObjectPy::deleteAllGeometry(PyObject *args)
{
if (!PyArg_ParseTuple(args, ""))
return 0;
if (this->getSketchObjectPtr()->deleteAllGeometry()) {
std::stringstream str;
str << "Unable to delete Geometry";
@@ -228,6 +228,20 @@ PyObject* SketchObjectPy::deleteAllGeometry(PyObject *args)
Py_Return;
}
PyObject* SketchObjectPy::deleteAllConstraints(PyObject *args)
{
if (!PyArg_ParseTuple(args, ""))
return 0;
if (this->getSketchObjectPtr()->deleteAllConstraints()) {
std::stringstream str;
str << "Unable to delete Constraints";
PyErr_SetString(PyExc_ValueError, str.str().c_str());
return 0;
}
Py_Return;
}
PyObject* SketchObjectPy::toggleConstruction(PyObject *args)