About

© 2010 Eduardo Poyart. About

July 22, 2010

Non-welded meshes

Dealing with non-welded meshes (meshes that have coincident vertices) is proving to be very tricky. Consider the case below.



In mesh A, the original mesh, vertices V1 and V2 are very close together, maybe even coincident, but they are not the same vertex. The same is true for pairs V3-V4 and V5-V6.

Let's assume the algorithm decides to collapse V3 to V5, for example. To get correct results, the result of that collapse should be mesh B. V4 has to collapse to V6 as well. If V4 doesn't collapse to V6, there will be a hole on the mesh.

With an usual mesh representation with vertices and triangles, aided by edges (pairs of vertices) and a list of incident triangles at each vertex, there's no information that tells us to collapse V4 to V6 when we collapse V3 to V5.

What extra information do we need?

In addition to our per-vertex list of incident triangles, we probably need a per-vertex list of other coincident vertices. When doing a collapse, we not only follow the list of incident triangles and work with them. We also need to follow the list of incident triangles from the coincident vertices.

Is that enough? Not yet, probably. We know our source and destination vertices, V3 and V5. When we jump to V4 and process it, we need to know that we need to collapse V4 to V6, not V4 to V5.

What else do we need? What if V5 is coincident with V6 and a third vertex, V7? How do we know we need V6 and not V7?

I leave the answer as an exercise to the reader. I don't know it myself, at this point.

Ah, the joys of computational geometry!

No comments:

Post a Comment