Laplacian Smoothing in Kangaroo 2

Hey guys,

I am trying to planarize some hexagons on a double curved surface. It works very well by far. But at some point my surface gets an “edge” where the curvature changes its algebraic sign. My idea was to do a laplacian smoothing goal object, like the force object from kangaroo 1. Isnt there an laplacian smoothing in K2 anymore? How can I smooth out the edge?

Best regards
Paul

The ‘Smooth’ goal is the equivalent in Kangaroo2 (the smoothing used is still the same Laplacian smoothing).

I made it so it just takes a mesh as input, to avoid users needing the extra components to identify sets of vertices and neighbours. I hadn’t thought about this case though were you don’t have a mesh (or it is made up of ngons).
Internally though the goal still works the same, so with a small script it should be possible. I’ll post an example of this in a minute.
Can you post your file?

planarhex_smooth.gh (18.5 KB)

Here’s an example of smoothing and planarization of hexagonal panels

Because of the scripted component you’ll get a message about the referenced assembly location the first time you open it - you’ll need to set this to the location of the KangarooSolver.dll that Rhino is loading.

If you are using Rhino6 this will be something like
C:\Program Files\Rhino 6\Plug-ins\Grasshopper\Components

or if you are using 5 it will be
C:\Users…\AppData\Roaming\Grasshopper\Libraries

1 Like

Nice, did not know that is possible to do so. Would it be possible to wrap these lines into a component too at food4rhino?

Hmm I tried the same thing several times. The laplacian smoothing does not give an effect if CoPlanar goal is set to 0 as strength. I think it should help a little bit not to distort panels too much but I do not see big effect just for smoothing. Cull pattern for sure distorts the planarization.

I have one question why there is cull pattern ?

Hi Petras,

Yes, I should be able to include some version of this as a standard component in the next release.
Eventually of course it would be nice if it could take ngon meshes directly.

I forgot to mention for anyone else that downloads that file above - it uses the old ‘topologizer’ component (which you can find here) to get the mesh vertex neighbours.
I used the cull pattern to get only the vertices which have 3 neighbours - to avoid affecting the points of the hexagons on the boundary, as otherwise I think it would straighten these out and shrink the whole shape.
It looks like you’re using your own way of getting the vertices and neighbours though.

So I’m not sure I completely follow your post - is the bottom right image what happens with no Laplacian smoothing?

I think in general Laplacian smoothing will only work for keeping planar hex meshes smooth when they have positive Gaussian curvature. Once you have negative curvature and the hexagons become convex, the ideal location for a vertex may be outside the triangle formed by its neighbours.
Another approach to smoothing hex meshes I’ve played around with is making pairs of opposite edges of the hexagons parallel, since this can be applied to both convex and concave hexagons. I didn’t take this far enough to get nice results from it - but maybe it is possible…

Oh, I was using different adjacency, after looking at “topologizer” I extracted correct mesh ngon vertices for laplace smoothing.

And I see that on positive curvature it is good to use those two goals (smooth + project points on plane) but on the negative curvature it is better to project points on plane only without smoothing. I think you meant the same thing?

Yes exactly - this smoothing+planarization works okay for positive curvature, but for negative curvature I think some different strategy would be needed to keep the hexagons ‘nice’.

1 Like

Hey Daniel,

thank you for the quick response and in the same moment I am sorry for mine being late. So I dragged the old topologizer on my grasshopper canvas and I renewed the path for the .dll. But the laplacian component has another error. Idk if anyone of you could help, because its in German.

“1. Error (CS1705): Die Assembly ‘KangarooSolver, Version=2.4.2.0, Culture=neutral, PublicKeyToken=null’ verwendet ‘RhinoCommon, Version=5.1.30000.13, Culture=neutral, PublicKeyToken=552281e97c755530’ mit einer höheren Versionsnummer als die Assembly ‘RhinoCommon, Version=5.1.30000.12, Culture=neutral, PublicKeyToken=552281e97c755530’, auf die verwiesen wird.”

Can’t update my Rhino to a newer version. Does anyone know what to do?

How do I make my file ready to post? I read about that it needs to be prepared somehow, so that it isn’t to big.the_need_to_smooth.gh (49.3 KB)

It looks like you just need to update your Rhino to a more recent service release

Hi, I read your discussion and I think I can refine my planarization process by using the smooth goal.
Anyway I tried to include it in my process but it seems it doesn’t work properly.
My main problem concerns the planarization at the supports and I don’t know how to fix it.

Any suggestions woud be very appreciated.
Thanks a lot,
Marinellaplanarization-problem legs.gh (39.7 KB)

I recently saw another way of keeping planar hexagons in curved meshes ‘nice’, by making sure the points lie on 2 circles. This also allows them to become concave if needed
image
(from this paper: http://www.geometrie.tuwien.ac.at/cmueller/dualhex2011.pdf)

Here’s a definition that applies that to a form-found hexagonal mesh:


PlanarHexShell.gh (24.1 KB)
(requires the new Kangaroo 2.5 which you can find at the bottom of the downloads list on Food4Rhino)

(I think applying the constraints during the form finding like this will generally work better than form-finding with quads, then mapping hexagons on and trying to fix them after)

11 Likes

Thanks a lot!
I have a curiosity: when we use Kangaroo 2 for planarization, in general besides this case, which methodoloy we rely on to reach planarity?
Actually, I found a lot of different methods (theoretical principles) to planarize hex.

Moreover, if I wanted to start with mesh, how could I get the same results?

Cheers,
Marinella

Hi Daniel,

I’ve been experimenting with applying this method to surfaces with negative curvature, but haven’t had much luck. Attached are attempts that apply a coplanar goal to the points, which brought me to this thread. The results are interesting, but not quite right as I think you’ll see in the samples (if you find the time, of course!). In fact, the saddle fails to converge …

Also attached is an attempt at applying your conformal sample above to the mobius strip, but I’m not sure how to interpret the results, as they aren’t much different than my attempts above. Any insight?

Mobius_Hex_1.gh (18.7 KB)
PlanarHexShell_Mobius Test.gh (17.1 KB)
Saddle_Hex_1.gh (19.1 KB)

Hi Nick - sorry I missed this at the time.
I just posted something in another discussion that is maybe useful here:

Thank you, Daniel - and no worries! I figured out a hack solution, but look forward to trying out your new example.
Cheers,
n

Hi Nick,

I am looking for a solution to flatten the hexagonal panels on shell surface. As you mentioned, you found the solution.

Could you please share the file where you tested it?

Thanks in advance

Apologies for the delay - I was not notified of your reply.
Did you try Daniel’s examples above?

Thanks for everyone who contributed to this thread, we were able to use the Laplacian Smoothing and planarization successfully in this project: Beehive Pavilion / OCA (Office for Collective Architecture) | ArchDaily

3 Likes