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:
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?
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:
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?
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.
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?
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.
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.
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.
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.