Skip to content

Commit

Permalink
Merge pull request #4998 from nortikin/fix_4288_Cyclic_mode_of_Kinked…
Browse files Browse the repository at this point in the history
…_curve_node

fix 4288 Cyclic mode of Kinked curve node
  • Loading branch information
satabol authored Sep 21, 2023
2 parents 4c4bbca + d9bc611 commit 53fff9e
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 53fff9e

Please sign in to comment.