Sketcher: Python command to delete all the constraints at once
This commit is contained in:
@@ -33,6 +33,11 @@
|
||||
<UserDocu>delete all the geometry objects and constraints from the sketch except external geometry</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="deleteAllConstraints">
|
||||
<Documentation>
|
||||
<UserDocu>delete all the constraints from the sketch</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="toggleConstruction">
|
||||
<Documentation>
|
||||
<UserDocu>switch a geometry to a construction line</UserDocu>
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user