Grasshopper

algorithmic modeling for Rhino

Hello,

I know this is a popular topic but I am still having trouble creating a planar hexagonal surface on a compound curve.  I watched someones video on how to do it with kangaroo however it really didn't work for me.  Does anyone have a good, straight forward solution/ approach?

Attached a what I am trying to achieve which was done in Rhino w/o parametric capabilities.

Thanks.

-Colin

Views: 6414

Attachments:

Replies to This Discussion

I am not sure it is planar. For me if I try to put same hexagons around a cylinder it will just be possible to put a single row !! Do you agree ?

Hi Laurent,

Kinda close.  I want to do this on a complex curve (think sphere).  Attached is what I was able to do in Rhino, but wanted to find a way to achieve the same results in GH.

Best,

Colin

Topological planar hexagons however edge/vertex or line/curve distorted in their own flattness cannot geometrically tile a 3D curved surface, I believe. It depends on the original surface curvature but you have little curvature in the Z direction along the vertical sides, so a flat surface can't angle in there to match the three points of each pair of hexagons below it. Pentagons help, twelve of them being required topologically, to even properly connect lines into a ball.

For this type of surface, a Boolean subtraction strategy based on large spheres arrayed out way off from face center points along a surface normal may work well, especially since making them bigger and bigger while still just grazing the original surface will lead to flatter and flatter faces. Here is an extremely curvy example or two, which should work just as well with a hex grid instead of a triangular one:

http://www.grasshopper3d.com/photo/photo/listForContributor?screenN...

Thanks Nik! very helpful.

-Colin

After using a complicated script to do this work in 3D with ball cutters via Boolean difference, I thought to try first making the entire relief form flat first, to morph the flat structure onto the NURBS cup surface, and boy oh boy did it ever work more uniformly than using 3D orb cutters on a 3D cup. Different sized spheres return the *same* hex grid only less and less raised up as the spheres get very large.

My first question is whether these are different in character or just in Z scaling, so if I rescale them all to the same Z thickness, after extracting only the relief structure via Boolean union and splitting...and they are only *slightly* different in character, which means mere Z re-scaling of a single moderate ball size relief is an appropriate cheat to avoid slow Boolean union re-making each relief Z scale with different sized balls.

The one on the right is a very shallow relief scaled up to the same Z thickness as the pure sphere one on the left. And really, we will be mostly scaling *down* from a thicker master surface so that will attenuate any weirdness in the curvature. Indeed, I see no difference, so it makes sense to only archive the thickest one so we can control the full range of thicknesses, all the way to nearly flat bulbs. Here is the thickest one, just before the balls lose holes between them, scaled down compared to a shallow one made with huge balls to start with:

Now we just use Rhino Flow Along Surface or the Grasshopper Jackalope plug-in Sporf to morph this flat system onto our lathe form.

With Rhino history for the Flow Along Surface step I can rescale the original in Z and wait twenty seconds to see the update:

There are sad edge artifacts that will require some strategy to retain or later delete a whole row:

Maybe add more geometry to later delete or make a solid to hold stuff together?

So vastly decreasing the cell count and changing grid direction to match your cup:

The edges came out fine on this one, happily. The isocurve count has been increased by the Flow Along Surface command:

It can't be filleted yet since the joint where the cup NURBS surface has a joint now leaves feathery edges, so I went back and duplicated the border of the flat array, offset and lofted to make a protecting surface:

But that gave crazy artifacts:

I'm just going to use symmetry to fill in the joint with good faces that are not having to be joined as two halves. I had to turn my Rhino units tolerance down from a silly 0.0001 to 0.01 units to get a good re-join, but it still won't fillet without leaving holes.

SO LET'S FILLET THE FLAT THING. Same problem but a bit faster, and actually repairable manually. Rhino 5 is buggy as hell with core commands, damn it. This is not world class behavior.

Let's try it in Rhino 6 WIP, our great hope of the future: nope, the same. I had to simply manually copy the missing pieces from where it did work, which at least is easy to do in flatland. Now I get a cup:

This can *all* be done quickly in Rhino without Grasshopper, and Rhino affords you fast cage editing of the original flat array that Grasshopper cannot yet do. You just need to use Analyze Direction to be able to swap UV directions of the source or target and flip the source surface to achieve concave vs. convex patterns.

Grasshopper doesn't even have a fillet (multiple) edges component so there's not a lot of advantage to having some super slow parametric system via Grasshopper. It's not like you'll be able to see the changes fast enough to tweak a design.

Attachments:

I get the impression Rhino has been falling down the same rabbit hole, to join AutoCad. If Rhino is capable to climb back up to say, " What's up Doc " There wont be anyone left to hear the call, much less care! Lets hope the next generation of users wont get infected. :)

Your original patch surface strategy is also a huge winner, a very interesting system, but I combined it with a flat -> 3D flow along surface to start with a flat hex grid then map it to the 3D form, then to avoid boringly perfect patches, I then converted the curves to straight lines to obtain more flat surface facets, but the Grasshopper Patch component failed much of the time so there was only patchwork, so I invoked my recent Python access to the Rhinocommon patch command:
...that USES PARALLEL PROCESSING for 4X faster speed, and boy, it's a nice system. If you wanted to then rescale the relief, you could take the polysurface and re-morph to flat, Z-scale that and morph back. But this is a pretty sweet result, now nicely automated compared to your original manual patching in Rhino.
The fillets or blend edges command failed but I fixed that by just changing the patch spans to a lower number! Nice system now. You have invented a new method, really. I just automated it.
Using straight lines on a curved surface gives nicely mellow patch facets. Who knew? I didn't.
Grasshopper can't do multiple fillets and that step is very slow so is best done in Rhino anyway.
Inline image 1
I haven't yet automated adding the hex grid, but the parallel processing patching itself with these crude number of spans is very fast, only half a second (!) so this system could indeed be slider tweaked in real time, more or less, unlike the 3D Boolean strategy. Since each item is a *cell* you could also start doing wild 3D stuff in there to add more objects to the patch curves, to control the facets differently. But these are natural and nice as they are, thankfully.
You'll have to install Grasshopper Python, that may require a Rhino IronPython installation too, I forget.
Inline image 2
Instead of a cumbersome polysurface, we need only build an end-tileable hex grid in 2D that can then wrap around the lathed surface. It's nearly instantaneous since it's just curves.
Attachments:

I can even take the patch spans down to only 2 and it becomes very fast, as if 53ms (milliseconds) and the final native Rhino filleting is also considerably faster.


It's a blast helping pull Grasshopper kicking and screaming into the industrial design market, meaning the world of real and efficient NURBS surfaces. The Grasshopper patch component was broken and there was no blend component until I made one in Python, simultaneously with Tom Jankowski.

http://www.grasshopper3d.com/photo/advanced-surface-tools-plug-in?c...

I vastly prefer to release things as Python, also minus the cult of object oriented programming, so others can tweak them, Python being layperson readable.

Are you doing NURBS math or cheating by hacking things together with curves and then letting Rhinocommon do the math?


Colin blundered into this strategy for subtlety faceting surfaces, as he struggled manually in Rhino, but I find it fascinating how forcing lines onto a curved surface, then patching the non-planar line-based cells, gives a beautiful ceramic cup I one day hope to find cheap in Chinatown.

A clear answer is to see God better, thanks.


What is a pointer?

I was able to get it to work with shallow curves, not with deep one, including covering an inflection point and curve reversal. Use Dan Piker's planarization, and play with the input variables. And yes, indeed, surfaces are flat to 0.001", you can walk a straight edge around the surfaces and they are flat. Here it is 3d machined in 6061 aluminum, 20" long, 12 " wide, about 1" deep

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service