Behind you! A three-headed monkey!

[2. Update] Tetrahedral Mesh Generation (GMSH) for SOFA

2011-03-22 – 14:40

Update:

There is now a better variant, for this reason (and to get rid of download-crawlers… ) the download has been disabled.

 

During the past few months I have spent lots of time doing experiments using the SOFA framework. In the course of my work I came to the point when I needed some more tetrahedral meshes than those that came included with SOFA. For this reason I started to do some reasearch on how to generate tetrahedral meshes from surface meshes (such as .obj). There are in fact lots of papers available on how to do this, but none of them provided a publically available executable. Furthermore, common programs for tetrahedral mesh generation either do not support the GMSH format (which is at least my own favorite due to good support in SOFA), or require manual work because of wrong order in the tetrahedra indices or additional information that is incompatible with the GMSH format. Anyway, none of those tools provided a solution for surface-to-tetramesh generation.

The solution for tetrahedral mesh generation from .obj files was found with PhysXViewer that is included in Nvidia’s PhysX SDK. It is available for free, but requires registration. The PhysXViewer allows you to import a surface mesh in .obj format and generate a tetrahedral mesh in different resolutions with a simple button and some sliders.

UPDATE: To generate solid meshes you have to activate the “Iso SIngle” mode. Otherwise there will be only an outer layer of tetrahedra.

The resulting tetrahedral mesh can be exported as an XML file in the NXUStream2 format. This format simply has some XML-nodes containing the vertices and the tetrahedra-indices . As the tetrahedra-indices are in correct order, it was pretty easy to write a PhysX_NXUStream2_to_GMSH_converter tool.

Physx NXUStream2 to GMSH converter usage

Download: Download disabled (see above)

The downloadable archive contains the sourcecode, the VisualStudio-2008 project, a compiled binary of the resulting program and some demo files (a simple sphere .obj file, the NXUStream2 tetrahedral mesh and the conversion result in GMSH format).

This tool is using the TinyXML library.

  1. One Response to “[2. Update] Tetrahedral Mesh Generation (GMSH) for SOFA”

  2. Hi,
    Really great job. Will definitely try it as i needed it. good job and great contribution :)

    By Zaheer Mukhtar on Mar 23, 2011

Post a Comment

Insert a smiley:


To prevent spam and comments of people who don't
know about mathematics you have to enter the result
into the field on the right side.
Hint: Possible answers are '-3', '-2', '0', '1' and '6x'.
Some challenges have more than one correct answer!

Please note: Comments will be approved manually!
It may take a few hours to check if yours
is legitimate even after solving the captcha..
Spam protection

Captcha