Hi All,
I am trying to use the sort points component to rationalise a data set. It mostly seems to work However, there are a few anomalies and I cannot for the life of me work out what is causing them.
In the screenshot below, the first three columns are ordered correctly but point 55 is out of sequence. My understanding is it should sort by x first (which it does fine) and then sort by y but in this case the sort by why is not correct.
donât know if this might be relevant at all, if your points proxected on XY Plane are compared to those of an âequal perfect gridâ, it looks like thereâs some distance between points that should be coincident
HI Inno,
Thanks for the reply, good spot!! I donât understand why that would impact the sort order. However, pinching your âperfect gridâ bit of code seemed to fix the issue .
well, that has a pretty straightforward explanation: letâs say the circled point at index 55 has a X value slightly bigger than all the other points that look like being on the very same column, then it means that point 55 does not belong to that column (sort by X, then sort by Y, then by Z)
we can test that, letâs take the X coordinate of point 55, compare it with X coordinate of point #42
if the difference is zero then they share the very same X coordinate, but if itâs âsomethingâ then they donât share the very same coordinate
in this case it looks like thereâs a super tiny difference in coordinate, so small that it doesnât get visualized in a panel
this means that the way the X/Y coordinates of the point grid might have gone thorough some troubles
another test, just for the sake of investigating the problem, if you trim the numeric values of the XYZ point-coordinates to just 3 decimals and sort them again, you will see the sorting looks perfect: