algorithmic modeling for Rhino
Hi, in a script of mine sort points is not working properly. The attached image below is not photoshoped ;) pos. 2 and 3 are not sorted in z from min-max.
If I internalise the data and copy the function to a new sheet it runs properly...
Is it known that sort points isn't reliable?
Is it a decimal error? As in pos. 2 is 0.00000000001 closer than 3 in x?
This could only be the case if when I internalise data it rounds the number, which isn't the case ?
Tags:
It is reliable. The numbers you see in the panels are rounded to 6 decimal places. There must be differences in the remaining digits of the x or y coordinates that affect the sort order.
I'll need to see the actual data before I can comment in specifics.
Sort may indeed mess up order, but only for items that sort exactly the same. This is not the case for your points. If the X and Y coordinates are the same for two points, then only Z is considered as a sorting key.
The problem (as shown in the file I posted) is that your Y coordinates are not always exactly zero. When Y values differ, even if only by a tiny bit), then Z values no longer matter.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by