Data Tree?

The polyhedron below is made from a number of triangles. I would like to scale each of these triangles (as is shown) and then loft a surface between the original curve, and the new one which was generated in the scaling process. The Grasshopper file that I wrote works fine for one triangle, but breaks down if I try to turn the input curve into a list of all of the triangles.

How can I use the loft command since it expects a pairing of curves while also iterating through this list of triangles?

I don’t really understand how to manipulate data trees, but I have a feeling that they would be helpful in answering this question.

I think you’ll have to graft your list of triangles. This will put them all in separate lists. So instead of \{T_0, T_1, T_2, ..., T_N\} your data will be organised like \{T_0\}, \{T_1\}, \{T_2\}, ..., \{T_N\}.

You then scale all the triangles, which results in a new tree with the exact same layout: \{S_0\}, \{S_1\}, \{S_2\}, ..., \{S_N\}. By finally merging these two trees, similar lists will be appended to each other, giving you: \{T_0, S_0\}, \{T_1, S_1\}, \{T_2, S_2\}, ..., \{T_N, S_N\}, which is the pairing of curves the Loft component can work with.

1 Like

That makes sense and seems to have almost worked!


Here is the file. Would you mind taking a look?
cutting-paneled.3dm (2.3 MB)

Your file has a lot of invalid curves, so I used clean tree. Then scale, graft both list of curves, weave them into lists of 2’s, loft. (11.6 KB)

1 Like

Awesome, thanks!

Do you know how I could edit the list of lofted breps such that I could generate a list of only the odd indices?

Cull Pattern (Set to True,False)