is there any way to sum the number of elements in a data tree,
I have a data tree with three lists, where many rows are empty but some of them contain points, and I need to know how many elements in total has each row… each index correspondingly. …Regardless in which list it belongs too, I need to know the number in total, So as a result I need a list with the summed up list length of three lists.
The length of the output should be the same, and I need to have numbers only…( 0 - if there is no element in that position in any of the lists, or 1,2 depending on the number of the elements)
Many thanks in advance
I’m sorry but I don’t have time for private consulting on this, or to dig deeply into your code.
Are you aware of these common patterns for working with data trees in GH? In this case, Shift Paths(PShift) required an ‘O’ (Offset) value of -2 instead of the default -1 before a clear pattern emerged - four lists:
If you go back and examine the code that produced this Data param, you can probably apply these methods earlier in the process to keep the tree from getting wacky.
I wrote this simple tool to visually examine the geometry in data trees and use it all the time: