I’m having a little trouble here. If we have a list of curves that is not in continuous order, is there any way to sort them (the end point of the 1st curve is the start point of the 2nd curve and so on)
I saw a node “Curves.SortCurves” in DynaMEP but it’s unusable.
I’m trying this way but I’m not sure if this is a correct way for all situation.
Appreciate your help very much guys.
I have seen this topic a few times and I have 2 solutions.
There is a Node in Archilab which can group curves based on the criteria you mentioned and I have written my own (faster) version of it. (See below)
These are 2 python nodes which group the curves based on their start & endpoint. They also log how quick the python script was in grouping the curves.
(MAKE SURE TO PUT IN A FLAT LIST OF CURVES :D)
SortPolyCurves.dyn (34.9 KB)
Thank you very much, I have tried to search on forum but could not find any relating topic. Maybe I didn’t search thoroughly.
Your script works fine for me, but the original node from archilab didn’t. Maybe I should have a look at these python code.
Thank you again for your help