Grasshopper

algorithmic modeling for Rhino

A while ago I posted this video about generating and unrolling developable strips:

Today I'm going to explain how to set this up in Kangaroo.

There are a few stages to the process:

  • Drawing an initial coarse mesh
  • Subdividing this mesh into strips of thin quads
  • Relaxing/Planarizing this mesh
  • Splitting and Unrolling

In this post I deal with the first 2 of these stages.

You can download the example definition here:

developable_strips_tutorial.gh

Drawing the initial mesh

 

To begin with we need a simple quad mesh. This can be modelled manually in Rhino, and only needs to use enough quads to give the topology and very rough form. No need to worry too much about the exact geometry or dimensions at this point, as we will refine and alter it as we go.

One very important thing that we do need to bear in mind though is that all internal vertices must have even valence (I covered this a bit in the earlier post here).

So for example, this is bad:

 

(because the highlighted vertex is surrounded by 5 faces)

While this is good (and can still be relaxed to the same shape):

 

(the top and bottom vertices have valence 8, and the vertices between the arms have valence 4)

With a little practice it should be possible to convert any mesh into one that meets this condition.

The reasons why we need this condition should become more clear in the later steps.

 

First subdivision

 

This is where we choose how many strips we want our final model to have, by applying a few rounds of subdivision using the Refine component (you could also use Weaverbird here):

 

 

Sorting the face directions

 

While quad meshes do not carry the same information about u/v directions as a NURBS surface, the individual faces do have a sort of direction given by their vertex ordering. However, these face directions are usually not consistently arranged, especially after subdivision.

The Kangaroo MeshDirection component attempts* to orient all the faces in a mesh so that they match with their neighbours.

For example, before sorting, if we draw a line from the midpoint of the first edge of each face to the midpt of its opposite edge, we might get something like this:

 

Whereas after sorting, we should get something like this:

*note that I say it attempts to orient the faces consistently. In some cases no valid solution exists, for instance if 3 or 5 faces meet around a vertex, hence the requirement mentioned at the start for even valence vertices.

 

Directional Subdivision

 

Now that we have consistent face directions across the mesh, we can apply further subdivision, but this time in one direction only. So we go from roughly square quads to thin rectangles. The idea is that as we apply higher levels of this directional subdivision, the final relaxed result goes towards something semi-discrete. A NURBS surface is fully continuous, and a mesh is fully discrete (made up of separate facets), while this strip model will be smooth in one direction and faceted in the other.

 

Go to part 2 for the next step of the process

 

Views: 16062

Replies to This Discussion

I seem to be having problems with the refine tool. I keep getting splotches on my mesh faces. Any suggestions?

Hi JMF,

What you are seeing there is normal in Grasshopper preview when you have more than one component on the canvas representing the same geometry.

The selected(green) mesh is being shown at the same time in the same place as the unselected(red) one, and the overlap causes this blotchy appearance.

Also - you'll probably want to turn on Preview Mesh Edges from the Display menu in Grasshopper.

Thanks that fixed it!

Hello

tanks so much for this tutorial!

I'm trying to recreate this exercise on kagaroo2, there is any update?

Thanks!

Hi Celso,

Here's an updated version for Kangaroo2

Attachments:

Ohh

thanks a lot!

Celso

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service