I’m experimenting with quad mesh extraction using libQEx. For now I’ve decided to focus on this instead of soft snapping.

The problem I’m having is the following: The triangles at the contour degenerate in the computed parametrization since they are all snapped to the same grid isoline. Using these uvs, libQEx either fails (empty mesh), or outputs a quad mesh with holes. If I shift the uvs by +0.5 libQEx still complains a bit, but it works and there are no holes.

What is the solution to this? Do I need to pre-process the mesh before giving it to libQEx? So that there are no degeneracies in the parametrization?


Summary, original uvs

###### Mesh Extractor Info ######
#vertices                 : 1559
#edges                    : 2963
#faces                    : 1405
#desired holes            : 1
#undesired holes          : 2
#isolated vertices removed: 683

Summary, shifted uvs

###### Mesh Extractor Info ######
#vertices                 : 1630
#edges                    : 3191
#faces                    : 1562
#desired holes            : 1
#undesired holes          : 0
#isolated vertices removed: 3
  • left : quad mesh extracted with libQEx using the computed uvs (contours on grid isolines)
  • right : quad mesh extracted with libQEx using shifted uvs (contours NOT on grid isolines)