How to draw an array of rectangles with respect to two curves?

Your colleague included GH code on his first post, without being asked.

As recommended here, and always appreciated for several reasons:

3. Attach minimal versions of all the relevant files

You started two threads, both without any GH code.