Hello!
Long story short: working on an open source eQuest BEM model creation in Rh/Gh project. (with all intention of moving in a direction of interoperability with LBT)
I’ve been writing some code to sort vertices:
and for the most part so far it is working: except, there seems to be some issue occasionally; with one or so surfaces: getting the vertices sorted counter clockwise:
I have solved this in the past by iterating over the surface border. Looking back at this I’m sure it could be improved but it seems to work well for my simple cases - note that I don’t care whether it is clockwise or anticlockwise, I just want the vertices in sequence:
border = rs.DuplicateSurfaceBorder(surf, type = 1)
edges = rs.ExplodeCurves(border, delete_input = True)
for edge in edges:
rs.CurveStartPoint(edge)