algorithmic modeling for Rhino
http://wiki.python.org/moin/HowTo/Sorting/
Assuming that your input is a list a curves named 'curves'...
sorted_curves = sorted(curves, key=lambda a: a.PointAtStart.X)
Thx,I did something like this:
def midPointX(crv):
domain=rs.CurveDomain(crv)
midpoint=rs.EvaluateCurve(crv,(domain[0]+domain[1])/2)
return (midpoint.X*100)
a=sorted(curves,key=midPointX)
and its working to.
Thanks again for help,
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