How to set and adjust distance between grid

hi.

i made a script the purpose of which was to divide all the floors into grids (u,v). as shown in picture in comment.

I am able to divide the floors segments (parameter). how can i adjust the distance between the grids instead of dividing it into 20 equal grid in both direction.

It’s just math at that point. You need to determine the local X and Y extents of your floor first. Then you can use those values to plot the parameters (percentages) of your specified interval along those extents.