Sketcher: IncreaseBSplineDegree python implementation

This commit is contained in:
Abdullah Tahiri 2017-02-16 22:46:30 +01:00 committed by wmayer
parent 4abe462a41
commit 55f373eef7
2 changed files with 22 additions and 0 deletions

View File

@ -162,6 +162,11 @@
<UserDocu>Approximates the given geometry with a B-Spline</UserDocu>
</Documentation>
</Methode>
<Methode Name="IncreaseBSplineDegree">
<Documentation>
<UserDocu>Increases the given BSpline Degree by a number of degrees</UserDocu>
</Documentation>
</Methode>
<Methode Name="calculateAngleViaPoint">
<Documentation>
<UserDocu>

View File

@ -1015,6 +1015,23 @@ PyObject* SketchObjectPy::ConvertToNURBS(PyObject *args)
Py_Return;
}
PyObject* SketchObjectPy::IncreaseBSplineDegree(PyObject *args)
{
int GeoId;
int incr = 1;
if (!PyArg_ParseTuple(args, "i|i", &GeoId, &incr))
return 0;
if (this->getSketchObjectPtr()->IncreaseBSplineDegree(GeoId, incr)==false) {
std::stringstream str;
str << "Degree increase failed for: " << GeoId;
PyErr_SetString(PyExc_ValueError, str.str().c_str());
return 0;
}
Py_Return;
}
Py::Int SketchObjectPy::getConstraintCount(void) const
{