List sorting issue

Hello!
Starting from this grid I’m finding hard time to get the exact middle point of each cell due to a wrong list order. Tried “Avarege” and “list Item” to get the “PointsOnCrv”.
Any suggestion on how reorder the list in the correct way?


Any kind of help is greatly appreciated. Gh attached.
MiddlePoint Sorting List.gh (82.7 KB)

Your code as it is seems fine - the points are roughly in the middle. Not sure what else you need?

I Would need to have the point exactly at midpoint beetween the upper and lower point of each cell. As it is now thay are roughly in the middle as you said and the middle point are calculated differently due to a wrong list order…


middle-2.gh (81.9 KB)


MiddlePoint Sorting List re.gh (128.2 KB)
Every cell contains 6 Discontinuity points but 3 cells contains 5 .If you can make the input cells more similar or consistent, the def could be more briefly.

here is an other version inspired by this post.It is interesting that one closed curve can have both 5 discontinuity points and 6 discontinuity points in same time if you analyse the curves in different ways.Maybe it is a bug.


MiddlePoint Sorting List re01.gh (126.1 KB)

1 Like

Thank you so much @ftzuk @user454 for the interest and help on this. Don’t know if it’s a bug but your definitions both work pretty well on what I was looking for.
Really appreciated your help. Cheers