Sort Triangles Edges Based on Distance to Curve

Hi everyone,

I was hoping someone could help me out with a problem I am being unable to solve. I have triangles organized along rhomboidal rings. The final purpose is to be able to select the edge of each triangle that is furthest away from its corresponding ring. (yellow in picture)

But I am failing:

SortSides_v01.gh (10.8 KB)

Thanks for any help.
Shynn

If your shapes are triangles this will work
SortSides_v02.gh (13.2 KB)

Thank you! Thats a cool way to do it!