Reorder list: sort brep and curve together

Hi all,

I have a grasshopper script as attached below. What I’m trying to do is to sort the Brep and the Curve together, so when I loop within the list the Brep and Curve in the same location will be selected. I used the sort point component, and they have the same index (can be seen in point list), but if I reorder the list by sort list component, the result is not desired. Could you please see where I’m doing wrong?

Enclosed is a screenshot: as I select item 2 in the list, both Brep and Curve list doesn’t show as the point list do.

Many thanks!
sort brep and (2.4 MB)

If it’s your goal to associate each brep with the bounding curve, then maybe this works for you. On the other hand, why wouldn’t you do this to begin with???

sort brep and curve (2.4 MB)


Thank you! It’s an elegant solution! My script has an initial order that might be useful somewhere else but a double thought it is unnecessary… :sweat_smile: