Curve length branch

hello, i have a problem for sorting my curves,
i have a list of curves with different lengths and i want to sort them by their length so that curves with the same length go to a specific group,

is anyone here help me by that?
here is the definition


curve length sort.gh (94.7 KB)

Just use C Set, Member Index and Item like so. Also you can use Round (x,2) in the expression instead of format if that’s easier to read.

Sort Curve Lengths - Groups.gh (103.9 KB)

1 Like

Thanks a lot, it was really helpful
and can you please guide me how to select from them?
i mean how should i select curves with length for example 0.36?

Hi,
I’m almost sure it’s not the optimal solution but it works (I’m answering because nobody has answered so far)

Sort Curve Lengths - Groups.gh (99.2 KB)

1 Like

One way is to replace the CSet with a slider or a panel this, will only find the ones with the number and not sort all the others mind.

If you need it after the grouping just do it like this.

Updated Code attached (Now Matches Pictures :grinning:
curve length sort Update.gh (98.8 KB)

3 Likes

thank you

Thanks dear Matt but its not the updated file, can you please attach it again?

Ah sorry, Seems not to have saved before uploading. Updated code above and also attached here. curve length sort Update.gh (98.8 KB)

1 Like

Thanks for your kindness :slight_smile: