Grid from custom surface (Populate geometry non random version)

I’d recon my question is pretty easy but I lack the grasshopper vocabulary to find my answer online.
I have a rectangular surface with a hole in it. I want to construct a linear grid from this surface with the hole in it. Similar to how Populate geometry works but then I want the points in colomns and rows instead of spread randomly.

Thanks in advance!

Something like this?

Screenshot 2021-05-18 at 08.50.15 (12.2 KB)

1 Like

Yes exactly like this! Thank you!

When I use your script on my surface it creates a grid of the right length and width but it doesn’t follow the surface properly nor does it clear points in the hole (see image).

Can you upload your file?

Rhino surface only.3dm (113.9 KB)

This should fix it: (238.5 KB)

1 Like

Thank you for your fast replies!
The current script only creates the grid on 0,0,0. How could I make it to populate the surface so I could move and reshape it for other situations? Now it doens’t follow the hole regarding it’s relative size and position from the rectangle but it acts as a perforator now.

No, it currently creates the grid at the default plane of the base surface.
If you want it on another surface, you need to switch to that one in Grasshopper.

It always depends on the situation. At the beginning of this discussion, you hadn’t even provided a file to work with, and I came up with a base geometry. Then it didn’t work when you tried to apply it to your situation, because some parameters changed. You see the issue here?
The best thing you could do is provide at least a couple of examples, since you seem to be eager to apply this definition to many different surfaces.