Selecting multiple branches

Here is a seemingly simple problem:

I have a list of trees that I want to select and I have a set of trees.

Insted of getting my “shopping list” as on the left, the TreeBranch output gives me all the trees one by one. The outcome I am looking for should be not like currently this

{0} (9,12)
{1} (33,40)
{2} (11,20)
{3} (39,19)

but like this:

{0} (9,12,33,40,11,20,39,19,4,32,28,2)
{1} (8,17,15,41)

Any idea how to solve this? (10.7 KB)

[edit] this is 100% right, but there might be easier ways to get to the same result (14.8 KB)

1 Like

@inno may have already answered your question, but if like to clarify a few things I’m confused about. The only way to have “a list of trees” is to have them in different parameters. As soon a data is in a single parameter, it is always merged into a single tree. Your image does show two trees going into the Branch component, are those 2 trees what you meant by “a list of trees”?

What does “a set of trees” mean?

1 Like

@inno thank you! This is a great workaround - however I am wondering if it would be possible to solve this with fewer components?

Thank you @DavidRutten!
Sorry for the confusion, I meant a list of branches.

Would there be another way to achieve the result by @inno more directly?

@rudolf.neumerkel You can also check this post


Thank you Sir, the script is working great - really have to advance my C# scripting skills (at least I was able to change the data hint to brep…)