Split curved surface by distance

Hi all, I’m trying to divide this surface horizontally and vertically.
As attached below, you can see the surface is divided by the given number from the slider.
Now the length and height of each rectangle has to measure 3.5 x 1.5 m but I’m stuck on rewriting the code block.

Any help would be very much appreciated
Thank you