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?
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?
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
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.
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?
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=184.108.40.206, 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)
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.
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?
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?