Spiral curve from closed curves

Hello, I have these curves set of curves. Which I want to transform into one Spiral / Helix curve.
Does anyone have ideas on how I can get this done?

Thank you
RANE
Spiral from Closed curves.gh (57.5 KB)

Tadaaa

Spiral from Closed curves.gh (68.0 KB)

7 Likes

Thank you @magicteddy it worked.

You could also use loft and surface.

Spiral from Closed curves.gh (69.2 KB)

2 Likes

hello! i was attempting to input my own set of curves into the script but seem to have run into some issues


something seems to be behaving strangely just about here

Here’s the file
Series of closed curves.3dm (191.6 KB)

Thanks in advance :slight_smile:

Why are your curves so far from the origin? X = 1.0865e+6 :exclamation: :question:

@magicteddy’s curves are sorted from bottom to top. Yours are in random sequence, depending on how you select them for “import” to GH. Yours can be sorted like this; wait, they also need to be flipped to all have the same direction:


Spiral from Closed curve_2024Jan29a.gh (78.7 KB)

Curves are internalized, no need for Rhino file.

P.S. Might also be helpful to have their seams adjusted so their end points are aligned? I didn’t look at @magicteddy’s code until after i posted this… A little surprised it works so well.

1 Like

It’s no surprise that seam alignment, or lack thereof, does indeed affect the spiral. @magicteddy needs to add code that guarantees they are aligned, though his curves and yours are close enough to look OK.

Spiral from Closed curve_2024Jan29b
full size
Spiral from Closed curve_2024Jan29b.gh (82.1 KB)

I started to write what I thought would be simple - and it was for your new curves. To sort the curves in sequence, flip them to all be the same direction and finally to align their seams.

Unfortunately, it failed to handle the original curves because the guide curve was not close enough to the same plane as the highest curve to flip it correctly. So I developed a new, rather elaborate method to make sure all curves have the same direction - the purple “flip guide” group.

While I was at it, I enhanced the white group that sorts the curves in sequence to work without using Z values - and rotated your new curves 90 degrees to test it, internalized as 'Crv 2 (H)'. I also moved your new curves ('Crv 2 (V)') and the rotated copies to the origin.

Finally I wrote the yellow group to align seams using Anemone. But again, the odd angles of the original curves causes issues, They are visible in your new curves to a lesser extent. The yellow group can be bypassed by connecting ‘Crvs SortFlip’ (green / white group) to ‘Crvs Final’ in the yellow group. :sweat_smile:


Spiral from Closed curve_2024Jan29c.gh (108.0 KB)

2 Likes