algorithmic modeling for Rhino
Hi,
I've been struggling with a problem so I thought I would fire it at the community, I hope it isn't too difficult to workaround.
I've got point coordinates from a number of random curves, listed in branches. I want to re-order them so that the curves are listed in ascending order from their first x coordinate. So basically the curve starting from the furthest left will be at the top of this list. I've attached an image to demonstrate.
Any help would be much appreciated.
Tags:
please upload something to have as a base to help you with, it looks like these are coordinates so it is not like a simple list of values. Meaning that the first index in each list you want to compare has more one value.
cheers
alex
http://www.grasshopper3d.com/forum/topics/how-to-get-help-when-you-...Anyway
you can try the following
first you have to deconstruct the point into xyz coordinates (deconstruct point component) then you have to sort the 3 list with the x values. then you have to sort synchronously the branches according the sorting of the minimum x values in each branch.
and you re done
cheers
alex
ps dont forget to right click the select branch component and select renumber
thanks!
Thanks a lot Alex and Torben. Exactly the solutions I was struggling to achieve.
I should have posted my definition, i'll make sure to next time i'm in a spot of bother.
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
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by