Using Grasshopper to calculate the incline of curving ramps in Rhino
Friday 19th February § 43 Comments
If the title is completely baffling, then the rest of this post probably won’t mean much either. Rhino is my preferred NURBS based 3D software, and Grasshopper is a plugin that generates shapes using a logic built up using a flow chart type graph. I’ve been learning Grasshopper as part of my current project, and finding it really valuable in moderation. It can do things that
The way I like to think of Grasshopper as a box of tools that you can use in certain situations, and you can make your own sophisticated tool out of primitive building blocks. It’s nice to open a Grasshopper file, apply a transformation or calculate a geometry, and then get your results back into the familiar world of curves, lines and surfaces as soon as possible. It’s particularly good if your tool does something generic enough that it can be re-used again and again in different projects.
Anyone who know’s my work can verify that I use curves everywhere in my designs. It so ingrained into my designs that it feels unnatural when I constrain myself to straight lines. In my latest project (which I’ve been working on for over a year now!) I’ve been taking this to the extreme. There isn’t a straight path in the whole scheme. My response to the site also leads to a requirement for a series of changes in level. Exterior changes in levels and curving inevitably means curving ramps. If you’ve ever tried to do this accurately in Rhino you’ll know that this can be a real pain. I spent far too long starting out with a straight ramp curve and trying to Bend it into the shape that I wanted. Time I could have spent more productively elsewhere if only I’d spent the small upfront time to work this out earlier.
My simple Grasshopper definition takes a flat curve (planar in the z axis) and from it, generates a curve that will follow the same in plan, but in profile rises along the length of the input curve at an incline that you set.
First, download the Grasshopper definition ➞ Curving Ramp.ghx.zip. It should look something like this:
Once you’ve opened the file in Grasshopper you need to select the input curve:
Adjust the ramp gradient as required:
And then finally ‘Bake’ the resulting curve:
‘Baking’ is the way that you get your results out of Grasshopper. Think of it as a short way of saying: ‘Take a snapshot of this object as I see it now and translate it into standard Rhino objects of points, curves and surfaces’.
In this example the blue curve at the bottom is the source, and the purple curve is the result that’s been baked from Grasshopper, combined with a simple Sweep1 along the resulting baked curve to create a ramp that has a reasonably uniform incline.
For the true perfectionist (like me), you can apply the process to two curves, one offset from the other, and then do a Sweep2 between them. Doing it this way avoids the slight variance in incline when sweeping around a tight corner and is more perfectly uniform.
If the resulting ramp is facing the wrong way then you can flip the source curve using Rhino’s Flip command and it should then rise in the correct direction. Also, if your in architecture yourself, then be sure to check that the ramps length complies with the building regulations of your country.
Wheww, that’s quite a lot of words to describe something thats not hard to use. And this is supposed to be my non-geeky blog! I hope that a very specialist subset of you find this helpful. I also hope it’ll help people get over their fear of Grasshopper.. and of curves.
Curves are good. Embrace the curve!