Hello, I am having difficulty doing a variable offset of curve β I used the definition posted here from back in 2013, but I am having a hard time reapplying it to get the result I want.

Using the variable offset curve, I am trying to create pleated surfaces such that the amount of folding varies along the curve path. With the current curves, the offsetted curves end at different length, not aligning with the non-offset curves. In addition, I cannot loft via Grasshopper and can only loft baked curves on Rhino (image below).

The original script is able to seamlessly transition from the original curve to the offsetted curve:

I would greatly appreciate it if someone can point out where I am going wrong. Iβm attaching both the definition from the old post and the one I am working on. Thank you,

β mo

03.08.20_stitch glue_pleating_v0.1.gh (33.3 KB) curve.gh (11.9 KB)