Get specific branches from at tree based on a value

Hey,

I have a data tree that contains a series of branches. I would like to recieve only 1 branch then multiple branches have the same value (the green dot). The branches to be removed is based on the size of another value (the red dot). I would like only to recieve the branch where the “red dot” has the lowest value.

i.e.
There is 3 branches with the value 4.6. The branches with the values 84028 and 98637 should be removed as they are larger than 70588.

I have tried to visualize what I am after.

Best,
Silas

Silas, Can you post the entire definition or example of it? The context on how the branches are formed might make this easier.

example.gh (29.0 KB)

Here is and example of how the branches are created.
Each branch are basically just a list of numeric values for each “design”.
(The values in the example are different, but the princip is the same).

I hope it helps :slight_smile:

Can you internalize after the Kangaroo/Karamba components? I don’t have those plugins.

Okay, I have tried to make a new example without Karamba.
The tree i still a collection of branches (one branch for each “design”).

I would like to kind of group all the branches that have the same value in {0;i}(0) and get the branch from each group that has the lowest value based on {0;i}(1).

example.gh (7.9 KB)

Is this your intended example? Please clarify.

Yes it is, but i have just figured it out :slight_smile:

Thank you for being persistent with helping.

If you want to see it, the sollution is below:
example_solved.gh (12.4 KB)