diff --git a/utils/curve/nurbs_solver_applications.py b/utils/curve/nurbs_solver_applications.py index 3e315164f8..51ad1dfa68 100644 --- a/utils/curve/nurbs_solver_applications.py +++ b/utils/curve/nurbs_solver_applications.py @@ -188,6 +188,7 @@ def knotvector_with_tangents_from_tknots(degree, u): def interpolate_nurbs_curve_with_tangents(degree, points, tangents, metric='DISTANCE', tknots=None, + cyclic = False, implementation = SvNurbsMaths.NATIVE, logger = None): @@ -200,6 +201,10 @@ def interpolate_nurbs_curve_with_tangents(degree, points, tangents, if ndim not in {3,4}: raise Exception(f"Points must be 3 or 4 dimensional, not {ndim}") + if cyclic: + points = np.append(points, [points[0]], axis=0) + tangents = np.append(tangents, [tangents[0]], axis=0) + if tknots is None: tknots = Spline.create_knots(points, metric=metric)