Hi, I have a points list and I want to sort it by X coordinate first and then by Y coordinate.
If I use the “sort list” component I only able to sort it according to X coordinate or to Y coordinate.
Someone can help me?
Thanks.
To use Sort Points, you could also round in Python.
import rhinoscriptsyntax as rs
rnd = 3
npnts = [rs.AddPoint(round(i.X,rnd),round(i.Y,rnd),round(i.Z,rnd)) for i in pnts]
npnts = rs.coerce3dpointlist(npnts)
a = rs.SortPoints(npnts, True,0)