Sorting Curves with a loop (Anemone)

Hi there,

I am trying to sort a list of curves into 3 different groups.

I would like to do this with a loop. My idea is that the loop would find the intersections from the highest curve and it would use that data to determine the group.

The output that is needed is a data tree that has 3 branches with curves that are on top of each other.

Is there also a way not to input the number of loops but let the loop figure it out (until there is no more curves to to act upon)

if there is a different way of doing this please do share, but I still would like to understand how to do this with a loop :smiley:

Thanks a lot in advance.

Soritng curves.gh (11.5 KB)

What’s the benefit of sorting these curves with Anemone?

It’s quick and simple with grouping projected area centroids and sorting each group by Z-values.

sort_curves_z.gh (13.0 KB)

2 Likes

One way without anemone loop…


Soritng curves_re.gh (18.3 KB)

2 Likes

The idea behind the loop is to try and understand how to manipulate data trees with loops :slight_smile: this is a more straight forward way for sure

1 Like