Change index order based on point coordinates

Hi everyone,
I need a hint to solve a problem, which bothers me quite often while working on geometry. Id like to rename the indexes of items (i,e, Points) based on a "sort Points" Component. For instance points on Mesh edges have a certain order, which is random. Id like to give them a new index Order based on their Position in space (the z-coordinate).

The idea is to orient the average planes on mesh egdes to match
the z vector of the point on curve from the Face lines. They have a different history and therfore a different index order. I try to match them using sort Points. Don`t know if the problem is clear?

Help is desperatly needed and much appriciated!
Best, Kat

I don´t know if I understand you right, but all you need to do to sort point and their indexes is deconstruct the points, use sort list, plug the Z value in K, the points in A and their indexes in B.

Then again, not sure if this is what you need…

Hi everyone,

Is there a way to sort the vertices within the mesh and not just sort an extracted point list as shown above?

I realize it’s possible to use David’s method to get points to create a Delauney Mesh but that loses the structure of the original mesh.

Basically, I am trying to match the order of vertices on 2 meshes so that I can use Pufferfish’s TweenMesh function. I’d like to do that without having to re-form the 2 target meshes from a common base mesh.

Any thoughts?
Thanks!

If you are after “Interpolation” from Mesh1 to Mesh2 then don’t bother with indices because in order to make some sense … we are talking about the same Mesh just transformed in 2 positions in space. See attached.

Mesh_InterpolateTwoMeshes_EntryLevel_V1A.gh (142.5 KB)

BTW: If on the other hand we are talking about 2 different Meshes (whatever this means) … then the whole puzzle is faaaaaaar more challenging. Say going from a sheet Mesh to a blob Mesh (like the one used above) etc etc.