Hexagons on surface : Is there a tool that outputs nice hexagons?

Dear community
I tried some plugins to put hexagons on a surface with a seam.
I tried lunchbox, ngon. I didn’t try Paneling tool. These tools have problems or the seams (lunchbox, or too much points (polyline with 9 points for ngon plugin), not hexagons at the ends, or too much distorsion …
As I need quite nice hexagons I developed a little tool 2 hours work).
You just have to put the number of hexagons on a ring and say where is the seam (U or V).

Did I miss an existing tool ?

Meanwhile, bravo to McNeel/Rhinocommon for the extrapolation allowable on a [0 1] domain it is possible to go outside the domains.

10 Likes

I think there’s no other than your script to do so, because all plugins I know of use uv position, while I think yours probably uses some sort of subdivision of the reparameterized uv).
nicely done, it looks cool!!

I tag @user1951 here, because I had read a post lately where he tried to achieve more or less this I think for one of his drones.

@laurent_delrieu :clap:

1 Like

I use some recursion in order to measure distance between centers of hexagons, then I seach for the best u or v for the next ring (at the moment it is a single linear interpolation). Nothing too complicated but it gives some nice results. I’ll put this tool in Nautilus.

I also found that it is possible to remap UV with standard tool to remake a new surface that will be nicely paneled. But this is not easy to use.

2 Likes

Hello Laurent Delrieu,

By coincidence I to have been exploring the hexagonal shape. Or more so hexagonal lattice. I believe what you show is essentially the lattice that graphite would be, although in sheets and I guess equal area to each cell and planar ? A single six carbon atom-single bonds- hexagon ring is not planar because of the bond angles [109.5] between atoms. If we turn to the crystalline lactate of diamond - all carbon atoms in this case- matters are very interesting. Likewise, a benzene ring, six carbon atom ring. Lots of videos , explanations online about this and [no surprise] software to explore , visualize etc. molecules.
As is clear, this is not a direct path to what I sense are some of your goals : accurate , precise , adjustable 3D hexagonal geometry. But at least a way to check the geometry you get against a known and further I am hopeful that this route proves to be supportive and or data [ maybe model] from one source / and application can be use for another.

Thank you,

Andy

This could also be done with a triangular grid, voronoi and sporph. The alignment on some of the multi pipes is not so nice unfortunately…

vase_hexagons.gh (23.8 KB)

Thanks @martinsiegrist it is a nice way to map a pattern on a surface. For my application it lacks the fact to keep the hexagon (polyline with 7 control points), also the quite regular/circular hexagon and surely the orientation.
Here a screen shop with the 2 results

1 Like

@litwinaa thanks for the references but at the moment my problem is quite simple. I want hexagons with a nice shape. Lengths must be quite the same and shape stay on a circle.

In general to wrap any patterns onto a periodic surface so they keep their connections across the seams, you can use a modulo on the uv like this

rectangle_modulo.gh (11.3 KB)
That’s just for continuity across the seam though - nothing to do with resizing.

The parametrization sizing adjustment you show looks a nice tool

10 Likes

I played with @martinsiegrist definition and managed to get something more homogeneous, rebuilding flat rectangular surfaces from different sets of control points.

vase_hexagons_v2.gh (27.2 KB)

With correction of control points around seam at the end :

vase_hexagons_v2.gh (22.4 KB)

2 Likes

Interesting. Learnt something new with the rectangle mapping.

Very nice result. Here a comparison between the 2 methods.

I’ll have to make a version which hexagon rotated and also an automatic seam detection.

1 Like

And adding a Graph mapper can allow some control.

5 Likes

:slight_smile: I just did the same

Got back to the script above and noticed the surfaces did not behave as expected. After calling maths to the rescue, I rewrote the entire thing using domain mappings. It turns out to be extremely simple : divide the rail and “unroll” it, divide the length of each segment by the ratio of the biggest radius to the smallest radius, and scale this new rail to the same height as the pattern. This “deforms” the rail in such a way that when mapped back, the pattern is evenly scaled on the surface.

It works for any pattern made of polylines but if this pattern happens to be a square, then Map to Surface can be used to map any pattern from a unit square…



vase_hexagons_v3.gh (39.3 KB)

7 Likes

missing

Too bad, though I’ve had a hard time reading your GH code anyway.

Ha, I missed one of those during cleaning - edited post above. However it should not affect the main routine.

1 Like

vase_hexagons_v3 (1).gh

I still see nothing when I open your file, perhaps because of this?

1 Like

Nice work @magicteddy!

I’ve added the regular hexagonal pattern and a profile for the vase.

vase_hexagons_v3.gh (53.9 KB)

3 Likes

vase_hexagons_v3 (2).gh - At least I can see something, thank you. It’s a sprawling canvas though, so reluctantly, I’ll pass on trying to understand it.

I added this little component in Nautilus



hexagonsOnSurface.gh (5.4 KB)

Version 0.5

8 Likes