How to create a modified index? (for vertices and edges)


My understanding is that Rhino indexes vertices and edges similar to this:


Let’s say at this point a list is created in Python with all the corner vertices of this box. (v1, v4, v7, v10)

Then the box gets modified, adding a vertex or an edge and so the index gets shuffled.
Then the list is no longer accurate.

Is there a method that could be used in such a situation to have a relevant index even when the box gets modified, without having to re-scan it?

Below I came up with a version that might work, only if I knew how to implement it.


The concept is to use something like index spacing. So there are empty indexes available for changes that might happen between the vertices or edges.

So on (1) there is the spaced index and on (2) the box has been modified.
The modified box (2) has its original corners with the same index values and the edges are also the same, with the exception of new or collapsed edges. No old index values become irrelevant, unless the vertex or edge no longer exists.

Any pointers how this can be accomplished ?

The mesh would not be moved, scaled or rotated, as I have read this affects the index values too.

As you could probably tell I am relatively new to developing, so I might have overlooked an already existing solution. I couldn’t find one with the searches that I have made though.

Any help greatly appreciated !