Using OpenMesh, I have a mesh generated by third-party tools that I read in and when adding faces to the mesh, I get exactly this problem. addface::complex edge error in OpenMesh
Basically, the error is because the half-edge data structure uses directional edges between vertices of adjacent faces and when adding a face adjacent to another face with half-edges in the same direction ... this is a problem for OpenMesh, rather, the half-edge data structure.
This error results from some of the faces' vertices being added in the wrong order.
So my question is, how does one rearrange the indices of an imported file so that all the edges are in the correct order as required when using half-edge data structures?