This can also be done without any need for plugins or scripts, you just need to take a bit of care to match things up for the cells that cross the seam of the periodic surface.
Here’s a similar thing for triangles that could be adapted
1 Like