Grasshopper

algorithmic modeling for Rhino

Is there a component in Grasshopper that can be used to unroll cylinders without having to bake the cylinders and unroll them in Rhino?

Views: 5199

Replies to This Discussion

A cylinder is a rolled up rectangular surface.  The height of the cylinder is one edge and the circumference of the caps is the other.  Once you have these dimensions with a little math, making a flat rectangular surface would be easy.

Tuan's right...doing cylinders by math is probably the easiest.  But if you have less regular surfaces, you can use a VB script.  Just specify "x" in your input as a surface.

 

Private Sub RunScript(ByVal x As Surface, ByVal y As Object, ByRef A As Object)


Dim unroll_srf As New Rhino.Geometry.Unroller(x)

 

Dim crv As Curve() = Nothing   

Dim pt As Point3d() = Nothing

Dim txt As TextDot() = Nothing


A = unroll_srf.PerformUnroll(crv, pt, txt)


End Sub

Yeah... the thing is, I have a lot of pipes each with quite a bit of geometry on the cylinders (cut outs) and varying edge conditions. I'm trying to find a way to unroll all of them, while preserving the cut outs in them without having to unroll each individually.
Oh, I didn't see that script before, I'll give it a try.

David,

I have created the VB component, but where does it output the unrolled geometry? 

This is my first time playing with this feature.  Looking at it again, it seems that running the unroller with your pipes input as breps works better.  It takes each element you put into it and then unrolls it to the world xy plane.  It's pretty straightforward to reorient the unrolled surfaces to new planes.  I've attached a couple files that do the trick.

 

One thing...I did this in Rhino 5.0...just now checked to see if it works in 4.0 and it doesn't appear that the Rhino.Geometry.Unroller is available there.  The 5.0 beta is worth getting, anyway!

Attachments:
I went about Pieter's method and have them laying flat now, but I am curious to look at your script. You're saying the Grasshopper definition won't work unless I download the Rhino 5 Beta?
It seems so.  The Rhino.Geometry.Unroller looks like it's only available to the newest Rhinocommon in Rhino 5.0.

I'm going to see bale downloading 5 today.

 

Another thing I was trying to work out was a way to "select curves on surface to unroll" like the Rhino command allows you to do.

Hi Gabrielle, is this what you want? :

Pieter,

 

Thank you very much, it unrolls my pipes, however, something goes wrong. The pipes are 1" diameter which would produce a circumference of 3.14" but the unrolled surface is 4"... Any ideas on what might be happening?

 

Thanks again for your reply.

I should have determined the actual lengths of the cylinder instead of using the u and v domains ...

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service