Hello! I’m new to Grasshopper, so I have some difficulties.
I have this box, to make aggregations later on, I need to select just one vertical/horizontal line per face, but as right now diagonals lines and more than one line per face are selected.
Is there a method to do so, like making a sub list or something similar?
The Line component has a dotted and a double wire going into it. This is often an indication your data is not properly matched.
The problem here is that each of your faces had only one centroid, but four edges. This means the edge data is more complex.
If this is your flat list of faces:
\{F_0, F_1, F_2, F_3, F_4, F_5\}
you get a list of centroids with identical topology:
\{c_0, c_1, c_2, c_3, c_4, c_5\}
but you get six lists of four edges:
\{ \{e_{00}, e_{01}, e_{02}, e_{03}\}, \{e_{10}, e_{11}, e_{12}, e_{13}\}, ..., \{e_{50}, e_{51}, e_{52}, e_{53}\} \}
You need to either reduce the complexity of your edge lists, or increase the complexity of your centroid list. I recommend the latter.
By grafting your centroid data, you turn it from a single list with 6 points into 6 lists of one point each:
\{\{c_0\}, \{c_1\}, \{c_2\}, \{c_3\}, \{c_4\}, \{c_5\} \}
Thank you so much, it worked!
No, I wanted to select those lines, but only one per face. But with David method, it worked.