Twisting a progressive square-to-round shape – Grasshopper issue

Hi everyone,

I’ve managed to apply a twist to a cylinder without any problem, but I’m struggling to achieve the same result on a progressive square-to-round shape.

I suspect the issue comes from the changing section, but I can’t find a clean workflow in Grasshopper to get a smooth and controlled twist on this type of geometry.

Does anyone have an approach, a tip, or an example of a Grasshopper definition for this case?

I can of course share my GH file if needed.

Torsion on square round.gh (30.5 KB)

square round.3dm (105.4 KB)

Hi, I assume you want the wavy pattern to twist around the shape like the following? (I’m not sure if the waves are supposed to cut wholes into the shape, but your script should allow to tweak that)

Here’s the modified script:
Torsion on square round_v1.gh (40.4 KB)

My approach was to shift the points dividing the profile curves a liitle bit further for each curve. Since you create the wavy pattern by offsetting each alternating point in-/outward, this will also shift the wave creating the twist.

I hope this makes sense and I didn’t misunderstand what you were going for.

Thank you so much, it’s really valuable for what I’m trying to do.