Remove degenerate triangles from mesh and compute edges.