Pattern positioning

Hi all!
I’m very new with Dynamo and I’m facing some issues at applying a pattern on a surface.

I’d like to have a constant texture in which all the squares have the same distance from each other but what I have is a different “density” of the elements based on the curvature of the surface itself.
In my case, on the top of the object, where the surface is almost flat, the squares are distant to each other, on the bottom of the object, where the surface has a curvature, the squares are very close to each other.

How can I fix this?

Thanks for your help!