[Question] After the SPLIT TREE component, how to merge them into one data tree?

Hello everyone,

image
After I used the SPLIT TREE component, there is a list with odd index is null, another one is a list with even index is null. I want to do some calculation on the odd index one, and merge odd and even together to have a entire data tree.

#QUESTION 1
How to avoid doing operation with the null index?
Like here, I don’t want to have a calculation with the null index.

#QUESTION 2
After the calculation, how to merge them together?
I tried the component MERGE but it did not work what I expected.

Thank you for your reading.

Xingxin

For the second question, I found that there is a component called COMBINE DATA, which combine non-null items with a specific list.

Hi every one…
I solved the problem I proposed…

Finally, I use a REPLACE ITEM component to avoid the null item I don’t want to disrupt.

Regards,

This is a particular problem with Addition component, as it will ignore a null input. Arguably this is not the correct behaviour. You can put a x+1 expression into a number parameter to get what you’re after, or use an Expression object if you don’t mind the red error colour: nullapproach.gh (34.0 KB)

1 Like

Thank you, the God of GH, for the quick response!