Unofficial! At your own risk.
See TetGen.
This add-on can be used to visualize the Delaunay and Voronoi meshes produced by TetGen. It is designed with constrained Delaunay in mind (i.e. provide an input surface mesh to TetGen) - possibly it will also work for point clouds.
The usual installation for Blender add-ons. Probably the easiest is:
- Archive the
tetgen_vizdirectory to create a.zip. - Navigate to the add-ons panel in the preferences in Blender.
- Click
Install Add-on from Fileand select the.zip. - Make sure to check the checkmark box, and
Save User Settingsat the bottom so you don't have to reinstall again later.
Alternatively use the fast_install.sh script, and make sure to change the directory where Blender add-ons are installed to your systems.
Supports in principle all versions of TetGen; only the output is needed. File formats are described here.
Tested on Blender 2.7.9b.
The following are recommended: -n -f -e. See below for description. The flags are described here.
For visualizing Delaunay meshes, the following 4 output files are needed:
sphere.nodesphere.edgesphere.facesphere.nodeThese should be generated automatically; make sure you pass the-fand-eflags to get all the faces and edges (not just on the boundary).
For visualizing Voronoi meshes: TetGen has a flag -v, but as of version 1.5.1 this only works when you pass in point clouds as the input. If you pass an existing surface mesh, the following bugs will occur (not thoroughly tested):
- In
1.5.1: the.cellfiles are incorrect. - In
1.5.0: no output is generated. - In
1.4.?: output that looks OK at first but does not produce the correct Voronoi diagram.
Instead, this add-on recalculates the dual mesh from the Delaunay. To do this, it uses (because it is convenient) the neighbor file of neighboring tets:
sphere.neighwhich is generated by the-nflag.
The example files are in the example directory.
- Fire up TetGen on the
sphere.plysurface mesh provided:
tetgen -f -e -n sphere.ply
This generates .node, .ele, .face, .edge, .smesh, and .neigh files.
-
Open Blender and open the
TetGen vizpanel on the left. -
Import the Delaunay mesh: click the
+symbol next to the Delaunay mesh list and select the following four files:.node,.edge,.face, and.ele, which describe the nodes, edges, faces, and elements of the Delaunay mesh. The object will appear in the list under Delaunay meshes. The output should look like this:
Note: you may have to change the draw type from Textured to Wire (bottom left panel).
- Import the Voronoi mesh: click the
+symbol next to the Voronoi mesh list and select the.neighfile, which describes the neighboring elements in the Delaunay mesh. Make sure that the correct object is also selected in the Delaunay mesh list. The Voronoi dual is computed from these inputs. The output should look like this:
Note: click the Switch wire and textured draw types button to make all the Voronoi cells appear as wires/textured.
Note: we make a choice here for the cells on the boundary. Technically the Voronoi elements extend into infinity beyond the boundary of the original mesh; here we terminate them at the boundary. We simplify the faces of the Voronoi elements on the boundary by using bisections of the original triangular surface mesh - this is not quite correct! If you need this to be correct, this requires some further programming to calculate the correct intersections of the Voronoi boundary planes with the original surface mesh.
-
(Optional): Triangulate the faces of the Voronoi cells by clicking the
Triangulate all objectsbutton. -
Export all the objects to
.plyfiles by clicking theExport Voronoi objects to PLYbutton. -
(Optional) use the provided Mathematica notebook
check_voronoi.nbto visualize and validate the.plyfiles.


