Sketcher: implement command to decrease degree of a B-spline

This commit is contained in:
wmayer
2020-10-23 00:36:41 +02:00
parent c5d5d69c91
commit fc89f4eb0c
6 changed files with 122 additions and 8 deletions

View File

@@ -1396,6 +1396,24 @@ PyObject* SketchObjectPy::increaseBSplineDegree(PyObject *args)
Py_Return;
}
PyObject* SketchObjectPy::decreaseBSplineDegree(PyObject *args)
{
int GeoId;
int incr = 1;
if (!PyArg_ParseTuple(args, "i|i", &GeoId, &incr))
return 0;
if (this->getSketchObjectPtr()->decreaseBSplineDegree(GeoId, incr)==false) {
std::stringstream str;
str << "Degree decrease failed for: " << GeoId;
PyErr_SetString(PyExc_ValueError, str.str().c_str());
return 0;
}
Py_Return;
}
PyObject* SketchObjectPy::modifyBSplineKnotMultiplicity(PyObject *args)
{
int GeoId;