Rhino 8 layer panel sorting changes

Any rationale behind the sorting in Rhino8’s layer panel working differently than how it worked in rhino7? Specifically sorting Zeroes (‘0’) before Ones (‘1’), and all punctuation before letters?

Well I would think the number sorting is now closer to correct - 1 does not come after 9, 30 does not come before 4. However looks like there are still some bugs - 3, 30, 04 for example. Not sure about the ones that start with special characters, Windows sorting puts those at the top above the numbers, then numbers, then letters.

I am reading that as 3D not 30, do I have that right?

-Pascal

1 Like

Yep, didn’t look closely enough, thanks!

Well, number sorting as a value, yes. “3” and “03” are both numerically “3”, but as a string (as the layer ‘Name’ column suggests), any ‘name’ starting with “0” should sort ahead of any other number, which is not the case in Rhino8. Zero is ASCII character 48, and One is 49.

I’m asking about this because somebody re-wrote the sorting algorithm from 7 to 8 and it doesn’t work the way I’m used to it working and I wonder why and what the rationale for that change is.

Well, they might be strings but people frequently want them treated as numbers.

If someone rewrote the sorting algorithm, it is because of requests to do do. I think there have been a number of them over the years.

I see this guy which was on the list for… 10 years…
https://mcneel.myjetbrains.com/youtrack/issue/RH-24829/Layer-Uses-Natural-sort-order-when-sorting-layer-names

I think most people wanted the sorting to follow Windows conventions (not sure about what Mac does), which is what it looks like it now does.