Grasshopper - Extract Points from Grid Points at Interval

Hi All,

I am looking for a grasshopper definition where I can input a grid of points (at 0.2M) spacing and have a definition that can extract a secondary grid with a spacing interval multiplied by 0.2, eg; 0.4, 0.6, 0.8, 1.0M. I have trialed a couple of options using list shifting but haven’t had much success.

Any advice would be greatly appreciated.

could you please post your main grid points, in order to see how the data is structured?


[edit] if you want to approach the thing from a mathematical point of view, playing with point coordinates:

grid points do not need to have any particular data structure (here they are flattened and Jittered)

by playing with the Culling Pattern you can decide the secondary grid dependency on the first one

the sliders under the Pattern will shift the Pattern itself independently along X/Y

for instance:

just a note: when shifting pattern along X, sometimes the patter “slides” down along Y by a row: this happens because if the previous/next X values are culled, then it doesn’t have those reference anymore to keep the secondary grid stable

you can consider as if you are sliding the pattern along the bottom edge of the grid: whenever you are dealing with one less Y value, it will just move up one row… but at least this could be a starting point :slight_smile:

Secondary_Point_Grid_Over_Existing_Squared_Grid.gh (20.1 KB)

Assuming your starting list of points isn’t ordered or in even rows & columns. CULL DUPLICATES takes a bit of time depending how big the grid gets.

grid2.gh (108.9 KB)

1 Like

Hi @inno, here is the point grid that I have been experimenting with.
PointGrid.3dm (884.9 KB)
Hopefully I will get a change to test the sample definition you have supplied over the weekend and see how it operates etc.
Many thanks for your effort and helpful advice.

Cheers,
Michael

tried your points with my script, this weird things happens :slight_smile:

because the error is along Y, it might be even one single point with Y coordinate decimals slightly off…

to stay on the safe side, this group on top chops the point coordinates to 3 decimals

but please note that coordinates are chopped JUST for what regards the calculations: the points which are selected at the end come from a List Item onto your original point list, which is untouched, still with all its original decimals


Secondary_Point_Grid_Over_Existing_Squared_Grid_Re.gh (47.6 KB)