Generates grid from a partial grid.