Here a version with tileable subdivision. The same logic as previous, I add some mesh output so could be used to make a single mesh or a big tile.
grid_subdivision_LEGACY.gh (38.7 KB)
Continuing to play with the subdivision script and mesh output, here on a torus.