Sort component fails in some case

unhandled

#1

It seems that in some case Sort component fails to sort properly the points
In the attached GH definition Point #5 (X60,Z8.27) is before point #6 (X60,Z7.18)
Maybe the X value has a very small difference ?

The points were created by a defintion that generates values using Range component.
sort points.gh (10.1 KB)


#2

HI.
point 5 is actually smaller number than point 6, which is the round-up number of digits below the decimal point.
Attachment is a workaround.

sort points_re.gh (19.5 KB)


#3

Thanks a lot Kim.
This was my first idea, a rounding problem in the X value, but I didn’t know how to check it. Probably it’s the result of a translation (unit Z) that creates a different value.
I will include the round function into the definition that creates the points to be sure they have the same X value