# Kangaroo surface with holes

Hey everyone
I am trying to create a surface like the image as a reference, and we need to use Kangaroo for this. But as you can see in the the bottom circles are different than what they are supposed to be. How could I fix this? Or should I use the soapfilm for this?kangaroo holes.3dm (228.0 KB)

Kangaroo holes script.gh (33.7 KB)

Welcome @e.v.d.berg.1,

Instead of starting from a simple, rectangular mesh grid with punched out holes, you should begin with a base that is going to produce a nicer mesh topology later, like for instance hexagonal polylines that conform to the desired, rectangular outside boundary.

You can then add hexagonal polygons to the desired cells that will have holes.

After that all that remains to get a nice quad mesh is to well mesh everything. I’ve included a custom GHPython component of mine that does this for the cells with holes. The other cells can be turned into regular quads.

For Kangaroo, you’ll need a denser mesh with more subdivisions.You can subdivide it even further, if your computer can handle it!

There’s no need to use soapfilm. All you need to do is relax the mesh and apply some vertex loads! Et voilà!

If you want to diagonal-ize the mesh, do it afterward the simulation. Since, you now have a clean quad mesh this is also very easy to accomplish with Kangaroo.

Kangaroo holes script 2.gh (22.3 KB)

6 Likes

Thanks! I have a question thought. What is the Python thing you do? I am doing this excersize as part of my study and we didnt learn about Python yet. How can you do this without python? And why do you start with what you show instead of a rectangle?

Python is a general-purpose, high-level programming language that is beloved for its simplicity and relative ease of use (compared to other lower-level languages).
Many CG applications - especially in 3D (e.g. Rhino, Blender, Houdini, etc.) - support it as scripting language to do things beyond what general functionality lets you accomplish.
In Grasshopper, you can use it to make custom Pythonic components with GHPython.

My component does mesh lofting - similar to the Loft component that yield surfaces - from polylines exclusively. Grasshopper has no default functionality that does this with a single component (at least in Rhino 6), but the mesh construction can also be done with vanilla components.

In this rather simple case like so:

Note though that this is inefficient, since you first do an expensive surface loft to then convert it to a cheaper mesh. It is much more efficient to construct the mesh from points directly, especially when handling bigger files with more geometry, but this necessitates more components than just two, or a custom component - like mine - that does it that way for you.

It just makes much more sense topology-wise. If at all possible, you always want a perfect mesh, or problems down the road are pretty much guaranteed, and are usually hard to fix!
I guess it’s hard to understand, since it takes some experience with poly-modelling to really understand topology and edge flow, but just look how nice the quad faces flow in the solution I provided.
Kangaroo also hugely profits from a neat, regular subdivision. Irregular tessellations usually lead to unpredictable results.

2 Likes