Search code examples
meshtetgen

How to convert from .mesh format to .nodes, .ele and .face format?


I have a 3d mesh in .mesh format which can be read by medit visualization program. However I need to convert it into the .nodes, .ele and .face format that is the output format of tetgen (the 3d Delaunay tetrahedralization program) . What is the best way to do this conversion of formats? Is there a free program available to do this conversion?


Solution

  • The MEDIT_TO_FEM program produces .node and .ele files from an medit .mesh file.

    You might have to hack it to get triangles, though. It's simple: each (positively-oriented) tetrahedral element with vertices

    v0 v1 v2 v3

    has triangular faces

    v0 v1 v2

    v1 v3 v2

    v2 v3 v0

    v3 v1 v2

    The orientation of the faces will of course depend on the orientation of the element, so your triangles might require a different ordering of their vertices.