I’ve created a grid of rectangular surfaces that are cut by the edges of a roof, so now basically the panels are within the roof and the ones at the edge have the appropriate shape. Of these panels I have the corner points: a list of panels for each roof, and within that a sublist with the points of each panel. The amount of points can be three, four, five, basically anything up to eight. So I’ve made an eight point adaptive family.
What I want to do is make a function to create a new list with the same structure, except each sublist now has eight rows: the first two corresponding with the first two points, and the rest of the adaptive family points divided over the remainders of the points (so three to eight are corresponding with point three of a three point panel, 3 to 5 with point three and 6 to 8 with point four of a fourpount panel etc… I use a division and a Math.Round operation for this).
The basic idea is as follows:
for(sublists in list)
for(points in sublists)
#make eight new entries filled with the appropriate points
Except… when I make a function and input the list, what it returns even if I do nothing is an empty list with the same structure. I find it very difficult to make a new list, matching the input list, to do these operations in. I could basically create a list within the function with only the index , but then the node calling the function says that the list is over-indexed.
Does anyone have an idea how to do this best? So far, lists confuse me. Any help would be greatly appreciated.