Tile Hexagons around a cylinder?

I’m trying to tile hexagons around a cylinder.
I want to be able to change the radius of the hexagon, and return only results that fit whole hexagons only.

E.G. As I change the diameter of the hexagons, they always fit exactly.
Is this a rounding function? some sort of logic gate?


Test hexagon ring.gh (28.7 KB)

I just made a 3D print of this
which has the same general requirement as your design.

It is clear that anyone with a good understanding of high school geometry would be able to figure out an algorithmic way of determining the size of the hexagons (and squares in my case) and the diameter of the circular array in which they fit.

But you can also do it with simple trial and error. In my case I chose the latter approach and found the correct (to within about 0.005 mm) dimensions in around 5 minutes.

It would have taken me far longer to come up with an algorithmic solution. And something tells me that someone here will do just that - simply because they can.

Test hexagon ring_re.gh (20.2 KB)


or this…

Test hexagon ring.gh (18.8 KB)



Thanks for looking, and solving.

Also check out the Ngons plug in and example files. They feature tools that can do this very easily and not just on cylinders.

1 Like