Issue with Data Tree Structure in Rectangular Grid Script

Hi everyone!

I’m struggling with applying a Data Tree structure to @anon39580149’s rectangular grid script.

I want to modify the script to handle multiple grids instead of just one. While everything works perfectly for a single grid, I can’t figure out how to make Construct Domain² create the correct Data Tree structure when dealing with multiple grids.

Does anyone have advice on how to set up the domains properly or how to adapt the script to support multiple grids?

Thanks in advance for your help!



rectangular_grid_data_tree.gh (24.5 KB)

A basic rule when you set up scripts that you want to use for more projects and with different data structures each time is to avoid flattening and simplifying (I can see from the screenshot, I can’t look at the file right now)

are the multiple grids the same identical grid? if yes, this could be enough:

rectangular_grid_data_tree_inno.gh (19.5 KB)

otherwise something like this might work, specifying each and all different grids:

rectangular_grid_data_tree_inno2.gh (27.6 KB)

@inno Yes, every grid is different, therefore I need 7 separate pairs of lists with spacing values.
Your second solution works perfectly! Thank you.

1 Like