Skip to content

Commit

Permalink
fix #4288
Browse files Browse the repository at this point in the history
  • Loading branch information
satabol committed Sep 21, 2023
1 parent 4c4bbca commit d9bc611
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion nodes/curve/kinky_curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,15 @@ def process(self):
else:
segments = [first_segment]

new_curves = [SvSplineCurve.from_points(segment, metric=self.metric) for segment in segments]
if len(segments)==1:
# if len(segments)==1 then result curve is monosegment and smooth and is_cyclic has to be as is params
new_curves = [SvSplineCurve.from_points(segment, metric=self.metric, is_cyclic=self.is_cyclic ) for segment in segments]
elif len(segments)>1:
# if len(segments)>1 then result curve is multisegment and not smooth and is_cyclic has to be False
new_curves = [SvSplineCurve.from_points(segment, metric=self.metric, is_cyclic=False) for segment in segments]
else:
raise Exception("Count of segments has to be not 0")

if self.make_nurbs:
if self.concat:
new_curves = [curve.to_nurbs().elevate_degree(target=3) for curve in new_curves]
Expand Down

0 comments on commit d9bc611

Please sign in to comment.