I see many interesting solutions for creating spiral surfaces in Grasshopper …has anyone made an addon that mimics the rhino spiral tool…has the same parameters of start and end radius, number of turns, axis, along a curve…so that all I need in rhino is the start point and a line or curve to act as the axis and the other choices can be made in grasshopper with slides for all the values…maybe introduce an extra radius in between so that the spiral could have necks or bulges the way you can do with “pipe”. If there were two end points and a central point on a curve then I believe I could slide these about between 0 and 1 as the domain and apply radii with sliders to each point ( this is similar to the method for "pipe ) and then control the spiral.

If any one has done this I would be grateful to know…I use a lot of spiral forms in metal using flats and rounds and drawing each one from scratch involves a lot of hit and miss so ngrasshopper would make this a lot more versatile

thanks

Giusseppe…metalgarden.ca

# Spiral tool for grasshopper

**giusseppe**(Giusseppe) #1

**laurent_delrieu**(Laurent Delrieu) #2

I have done this one

Spirale.gha (21 KB)

It has these paramters

“AxisStart”, “AS”, “Point of start”,

“AxisDirection”, “AD”, “Direction”

“HelixStart”, “HS”, “Point of start of helix”

“Pitch”, “P”, “Pitch”,

“TurnCount”, “TC”, “TurnCount”,

“R1”, “R1”, “Radius of begining”,

“R2”, “R2”, “Radius of end”,

And use this method from Rhinocommon

Rhino.Geometry.NurbsCurve.CreateSpiral(axisStart, axisDir, radiusPoint, pitch, turnCount, r1, r2))

https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_NurbsCurve_CreateSpiral_1.htm

It is simple to implement this

https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_NurbsCurve_CreateSpiral.htm

It is also very simple to make your own component

**giusseppe**(Giusseppe) #3

Thank you Laurent,

I am not sure how a .gha file differs from a gh file but I shall try to work it out…

Much appreciation

Giusseppe

**giusseppe**(Giusseppe) #4

Sorry , just realized this is an add-on……I have loaded it in the library ……thanks

**giusseppe**(Giusseppe) #7

**laurent_delrieu**(Laurent Delrieu) #8

**giusseppe**(Giusseppe) #9

thank you…combined with pipe and extrude that gives me a wide range of possibilities…if you are interested to see the metal for real please visit metalgarden.ca…

Is there a place where I can learn to do these scripts for myself ?

**laurent_delrieu**(Laurent Delrieu) #10

Very nice job. Metal forming is fascinating

To learn how to make begin by understanding the operations that need to be done (see Grasshopper tutorials), then learning programming (Python, C# …) and searching in Rhinocommon the functions

https://developer.rhino3d.com/api/RhinoCommon/html/N_Rhino.htm#!

The programming logic could be learned outside Rhinoceros/Grasshopper world.

P.S. : The house where I grew

**giusseppe**(Giusseppe) #12

Laurent, I have been trying to solve a simple problem with trim….https://discourse.mcneel.com/t/trim-in-rhino-vs-grasshopper-mac-5-6/77091

I just can’t work out how to turn an extrusion from a closed curve ( my pastry cutter ) into a closed brep so that it will act as my trim cutter. I have no problem using this method to trim in rhino but grasshopper won’t let me do it. I can cap the cutter to close it but then I get a hole not a trimmed shape….

The objective is to use extruded wavy lines to create bumpy surfaces and cut out leaf shapes from them……I can do this in Rhino with trim and wanted to automate the process because once the leaf is trimmed I am able to apply bends and twists etc to it with grasshopper.I have everything working except this brep step.

Any advice would be appreciated.

**ejnaren**#13

Just a side question. Does this spiral function allow for creating Euler spirals? Spirals where the radius changes linearly with the length of the curve?

**laurent_delrieu**(Laurent Delrieu) #14

I don’t think there is a Rhinocommon function for that. I found that

**TomTom**(Tom) #15

Basically, as soon as you find any *parametric* formula, you simple use the expression or evaluate component and type it in. You’ll get a list of points which then can be interpolated. The only drawback, the interpolated curve might not have the best curvature flow. So all you need to do is googling “euler spiral parametric equation”.

Nurbs curves are parametric as well. Any Point on a NurbsCurve can be created by typing in any value for parameter t. If t is inside the curve domain, the point lays on the visible part. You can usually spot if a formula is parametric if its written like this:

B(t) = …, where t is the parameter, can be another symbol as well (often u)…Surfaces usually have u and v.

**giusseppe**(Giusseppe) #16

Just wanted to thank you again Laurent….the spirale and makes it so easy to do something like this which used to be so hit and miss in the past.