Grasshopper

algorithmic modeling for Rhino

Over the coming weeks I will be posting a complete set of example files to go with the new release (0.096) of Kangaroo.

Eventually this collection will come included with the zip download of Kangaroo, but rather than keep everyone waiting, I've decided to share some as they become ready.

This also has the advantage that questions about components can be more easily grouped under the relevant post - so please do add any questions / comments / bugs / suggestions about these examples below.

So today I am posting some examples of the mesh utilities that come with the new release.

While these are not directly physics based, many of the forces and types of relaxation in Kangaroo are designed to work with meshes, and in the process of development I've ended up adding a number of simple utilities to make working with them a little easier.

I recommend also installing Weaverbird which has many more subdivision functions and other useful tools for working with meshes in Grasshopper. Also Plankton, Turtle, MeshEdit and Starling extend these possibilities still further.

Diagonalize

This component replaces every edge of a mesh with a new face. The new faces will always be quads, except for along the boundaries, where they will be triangles. It can be used to easily create diagrids. The input mesh can contain any mix of triangles and quads.

When treating the edges of a quad mesh as springs, diagonalizing it will often significantly change its physical behaviour. If you are trying to planarize a quad mesh, diagonalizing may sometimes allow you to stay closer to a target shape if it matches the curvature directions better.

diagonalize.gh

Checkerboard

This component assigns the faces of a mesh into a checkerboard pattern. The output is a list of 1s and 0s (which could represent black/white or true/false) which can be used to dispatch the faces into 2 lists, where no pair of adjacent faces have the same colour.

One nice application I found for this is applying alternating clockwise and counter-clockwise rotations as shown below. Also, on occasion you may want to planarize a quad mesh, but have some constraints on the shape and grid that prevent this, and triangulating only alternating quads to give a hybrid quad/tri mesh can sometimes be a good compromise, allowing a bit more freedom.

Note - Not all meshes can be assigned a checkerboard pattern!

As a simple example, take a mesh with 3 quads around one vertex - If we assign one black face, then both the neighbouring faces should be white, but then we have 2 white faces adjacent to one another, which violates the checkerboard condition.

Generally, we can say that if a mesh has any internal vertex with an odd number of faces around it, then we cannot apply a consistent checkerboard pattern to it (although not having any odd valence vertices is not in itself an absolute guarantee that a mesh is 'checkerboardable').

checkerboard.gh

WarpWeft

This sorts the edges of a quad mesh into 2 lists of line segments, which are like the warp and weft directions of a fabric. They can also be seen as a sort of mesh equivalent to the u and v isocurves on a NURBS surface.

This can be useful if you want to control the shape of a tension structure, because it allows you to assign different stiffnesses in the 2 directions.

As with the checkerboard component, not all meshes can be consistently assigned warp/weft directions. It follows a similar rule - all internal vertices should have an even number of adjacent faces. With a bit of care, it is usually possible to model the initial mesh in such a way as to allow this.

This component also has an output telling us whether or not each line is on a boundary of the mesh, as we will often want to treat these differently.

Same mesh relaxed with different warp/weft stiffness:

warpweft.gh

MeshCorners

This one is hopefully fairly self explanatory. In many simulations we want to anchor the corner points of a mesh. This saves us having to pick them manually in Rhino.

It works on quad meshes, and looks around the boundary vertices for any which do not have exactly 3 connected edges.

corners.gh

That's all for now. Coming soon - a "mesh tools 2" post explaining more of the components.

Views: 9874

Replies to This Discussion

hi David,

in this discussion

http://www.grasshopper3d.com/forum/topics/how-do-i-install-a-custom...

you noted that this is the way to instal a component written by someone else.

2) If you're a user who wants to install a GHA file written by someone else then you should put the file in <user folder>\Application Data\Grasshopper\Libraries     You can either do so manually or drag+drop the gha file into Grasshopper and a copy of it will be placed in that folder (as you noted)

but the Diagonalize component is not being installed.

Is there another way?

kind regards,

Yasser

Hi Yasser,

Daniel here (was your question directed at me or David?)

The files in the post above are just example definitions (with the .gh) extension. There is no separate Diagonalize component file to download - it is just one of the many components which show up after you have installed the latest Kangaroo.

Add-ons/Plugins such as Kangaroo have a .gha extension, and may also include some other files, such as .dll files. Generally the instructions on how to install these can be found in the same place you download them from (eg http://www.food4rhino.com/project/kangaroo)

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service