Spiral in middle of a curve

Hi all, I want to create a curve with a spiral in the middle, I want to be able to control how many times it spirals and the height, I managed to create a spiral script in Grasshopper, but I am not sure how to straighten the start and end, I also wonder if it can be adapted for it to work on a curve that is not straight (polylined points).

Here is my script (feel free to use your own way) and please take a look at images below for reference:

Spiral.gh (8.7 KB)

Hey @Jess_Tanturro,

I have questions.

First things first—based on your first sketch, it seems that what you mean by ‘straightening start and end’ is actually having straight line extensions at both ends of your spiral, correct?

Like this:
Spiral.gh (13.4 KB)


I ask because I am not sure if you intended to simply manipulate the start/end control points, but that wouldn’t give you a ‘straight’ aspect from the start, as in this case:

Spiral_pull-end-ctrl-pts.gh (16.5 KB)


Now, regarding your second sketch and comment:

My question for you is: (1) do you need the spiral to adapt to a non-straight polyline as a transformation (e.g., ‘map from straight to non-straight curve’, similar to using the FlowAlongCrv component) or (2) do you want the spiral curve to be formed on and along a non-straight polyline, meaning both start and end points emerge from said polyline?

Cheers

1 Like

Spiral a.gh (19.1 KB)

3 Likes

Hey Jess,

Looking more into it I’m still unclear about some stuff, primarily overall dimensioning:
How much are you looking to straight-extend your spiral, what’s your final diameter of sections along the spiral, etc., or are you just trying to setup a ‘general system’?

Anyway, whether it’s short or long, this extension still occurs at complicated area, making sharp corners. Using perpendicular frames at the control points will leave you with ‘self-crossing’ turns as you realize. One workaround can involve using Multipipe because it’ll handle the complex curve and give you segments you can ‘steal’ as alternative ‘perp frames’ to make your circles. Then you can remove some sections that are too close to the sharp corners—I’m not sure this will help your cause, but it’s temporary insight while you clarify the dimension-related questions.

See if this helps:
Spiral (1).gh (29.9 KB)


If you clarify a bit more maybe we can think of something else :slight_smile:

Hi Rene, thank you for this, I have messed around with the script and I am almost there, but I am not sure how to fix this issue:

Spiral (potential).gh (21.9 KB)

The circles intersect into each other, I think because of the sudden turn from straight to spiral, and also the first circle is not placed exactly at 0,0,0 coordinates which might also be the issue, do you know the fix for this? I used fillet curve, perhaps I should use a different method to round off the curve so the circles don’t intersect? or the straight parts need to be longer?

1 Like

I wouldn’t know what to answer exactly (don’t know the project requirements thoroughly), though in simple terms both the sizes of circles and the turn in the curve influence what you see, but they’re separate things. Imagine you don’t have that sudden turn, if you still make your circles too big eventually things cross themselves—that’s why I was asking about your dimensions.

If you wish to keep the curve you have, you could pipe it (self-intersects) and then shrinkwrap it, but the resulting mesh will be an approximation.

So one workaround you could explore is to set up those sudden turns more specifically, by building an extension of sorts (or to build the correct sweep alternatively) then relying on isocurves and so on. Just an idea, I threw something together super fast and feels a bit rudimentary, but might get ideas going or attract other sets of eyes here to help out:
Spiral (potential).gh (30.9 KB)

NOTE:
Your extended isocurves will be ‘straight’, but they’ll project perpendicular to the naked borders of the extension surfaces (white), so maybe not a true workaround afterall if you need to be parallel to Z.

1 Like

I really don’t know what to say other than Twist and Flow exist for a reason:

This script uncharacteristically messy of me.
Spiral in middle of a curve VR 01.gh (20.2 KB)

1 Like

I think what happened is that the conversation took different turns (no pun intended).

Original efforts were preserved/respected, but then the goal (+ design needs) must have changed :nerd_face:

@Volker_Rakow @René_Corella Hi folks, the issue is, was, and always will be the curvature from the end of spiral to the straight part, the base circle (the first point on the full curve) must have a plane of 0 on x and 0 on y.

This is why I have given up on it at the moment as I think I am wasting everyone’s time, everything else, regardless of how convoluted or complex, is fine, the only issue is the connection between a straight vertical curve and the end of the spiraled curve should have a higher smoothing radius which “Fillet_Curve” does not achieve.

Please dont get yourselves too worked about this, perhaps the fix will come on a different discussion on here.

@René_Corella thank you for your efforts, much appreciated.

1 Like

What does this mean? Do you mean to say that the spiral needs to taper into its center before going into the “straight” of the curve? If so, you should probably look more closely at my script
 It behaves exactly this way and as drawn in both pictures of the thread opener.


@Jess_Tanturro Here, I have tidied up my scripting:


Spiral in middle of a curve VR 02.gh (27.3 KB)

1 Like

Yes I think what you have given me works, thank you for being patient, I will run the script later and see if it actually does what I intend it to or not.

1 Like

I made this from a method I used for a different kind of spiral:

extend-twist.gh (15.3 KB)

3 Likes