topological reconstruction of triangular meshes

Watton, John D. John.Watton at
Sun Jan 23 11:43:52 PST 2000

You might want to check out admesh:

Source is provided in C for reading STL files which are basically triangles
with vertex and normal information. The purpose of the program is to repair
STL files but it does write OFF and VRML files which are formats similar to
what you want back.

The usual technique is to hash the triangles with the vertices as keys in
order to collect shared vertices together. In order to handle tolerancing
the vertex coords are divided by a tolerance and rounded. Be careful though,
the integer values get large as tol goes down and integer overflows can

John Watton 
Alcoa Inc.

The compgeom mailing lists: see
or send mail to compgeom-request at with the line:
send readme
Now archived at

More information about the Compgeom-announce mailing list