At the level I have been using grasshopper, I think part of the difficulties I have encountered have to do with not knowing how to work with lists.
I would like to order a list with points that I know I would like to be the first and last points in the list, and for the points in the middle to be sorted according to distance (X,Y,Z). I’m trying to create a polyline in the end.
I have searched posts regarding sorting lists, but I haven’t figured out how to organize lists by setting first, or secondary items.
Grouped in the script is my attempt at merging, or entwining data, but manually creating lines from each point from a list item. I don’t think this is the most effective way, in this case it wouldn’t work if the list of points increased or decreased in value.
I’m not sure, I was thinking sequentially, one after another? I was just thinking what would be the cleanest way to order a list of points. In this case maybe ordered from their distance away from the origin?
SortingPointsHelp_RE.gh (26.6 KB)
Sequential Closest Points from Neoarchaic used
This was really helpful! Thank you Jakinta. I see this is using a c# component, I wonder if it is possible to learn how to achieve this using only Grasshopper components.
This will work for now, but I don’t know how to use C# as of yet.
Here it is with Anemone…
SortingPointsHelp_RE.gh (31.5 KB)