[Part] Limit periodic B-spline degree to number of poles

This leads to issues down the line in Sketcher. If there is a reason this should
be permitted within Part, then Sketcher needs to be adjusted.
This commit is contained in:
Ajinkya Dahale
2023-01-11 19:39:55 +05:30
committed by abdullahtahiriyo
parent 32bbdb0ab2
commit acb42e4109

View File

@@ -1226,7 +1226,7 @@ PyObject* BSplineCurvePy::buildFromPolesMultsKnots(PyObject *args, PyObject *key
if (knots != Py_None) { number_of_knots = PyObject_Length(knots); }
else { //guess number of knots
if (Base::asBoolean(periodic)) {
if (number_of_poles < degree) {degree = number_of_poles+1;}
if (number_of_poles < degree) {degree = number_of_poles;}
number_of_knots = number_of_poles+1;
}
else {