How to unify mesh vertices sequence

Yes, MeshDirection only matches directions up to a flip - i.e. the vector from vert 0 to 1 of a face will never be perpendicular between adjacent faces, but it can be antiparallel.

The original application it was made for was sorting curvature aligned quad meshes, which usually have vertices of valence 2/4/6
image

To make edges match fully without reversals would mean it could only work on meshes with all vertex valences a multiple of 4 which is rather restrictive.
I can see that for some cases like things that are topologically simple tubes or planes it might be useful though, and I could modify the script for this.

However, in the case where you know you want 0-1 to point upwards, things can be a bit simpler, like this:


meshdirections_up.gh (19.7 KB)

3 Likes