I am trying to determine if and when flipping an edge is topologically valid.
The current criterion I have is that it is only valid if there is no edge connecting the opposite vertices of the edge.
I.e. consider these 2 drawings where the first allows for a valid edge flip but the second does not.
To clarify what we mean by topological validity. Topology does not care about geometric information such as angles, the reason the second triangle does not allow for edge flips is, pick any edge between the face center and the other vertices a flip would create a set of 2 vertices with 2 edges in between them, this is wrong.
A possibly non inclusive set of restrictions on topological requirements of a half edge mesh:
All vertices are connected by either exactly 0 or exactly 1 edge (an edge flip can accidentally invalidate this).
All edges are contained in a face (the boundary face counts as a face).
There are no "butterfly holes", (2 triangles that share a vertex but no edges and no other triangles containing that vertex).
2 triangles cannot share more than one edge between them.
etc...
The above are all examples of topological requirements, this is what we are trying to preserve.