The -q switch performs quality mesh generation by Shewchuk's Delaunay refinement algorithm. Add vertices to the CDT (used together with -p) or a previously generated mesh (used together with -r) to ensure that no tetrahedra have radius-edge ratio greater than 2.0. An alternative minimum radius-edge ratio may be specified after the 'q'. Do not supply a too small ratio, e.g., smaller than 1.0, otherwise, TetGen may not terminate.

If no input angle or input dihedral angle (of the PLC) smaller than 60 degree, this algorithm is theoretically guaranteed to terminate with no tetrahedron has radius-edge ratio greater than 2.0. In practice, this algorithm offen successes for radius-edge ratio be 1.414 or even smaller.

Q = R/LIt is effective for measuring the quality of a tetrahedron. For all well-shaped tetrahedra, this value is usually small (e.g., samller than 2.5). While for most of badly-shaped tetrahedra, it is large. Hence, for a good quality mesh, this value should be bounded as small as possible. However, the ratio can not be arbitrarily small, it is minimized by the regular tetrahedron (in which case the length of the six edges are equal and the circumcenter is the barycenter), that is:

Q >= 0.612A special type of badly-shaped tetrahedron is called

The command line:

tetgen -pq winggenerates the quality mesh (shown below on the right) in three files: wing.1.node, wing.1.ele, and wing.1.face.

The input PLC, 323 points, 618 facets. | The quality mesh generated by switches '-pq', 5324 points, 24690 tetrahedra, 5714 boundary faces. |

**Hint**: By adding a '-V' switch
into the above command line, TetGen will print a brief quality report
on screen.

Default, the radius-edge ratio of each tetrahedron is bounded below 2.0. You can impose a tight bound by adding a number directly after the '-q' switch. Like follows:

tetgen -pq1.2 winggenerates a quality mesh (shown below on the left) which have more points inserted than the mesh created in above.

Another way to refine mesh is to impose a maximum volume constraint on the mesh by adding a number directly after the '-a' switch. The command:

tetgen -pq1.2a0.0001 winggenerates a quality mesh (shown below on the right) which has both radius-edge ratio bounded and maximum volume bounded.

The quality mesh generated by switches '-pq1.2', 11769 points, 59307 tetrahedra, 9632 boundary faces. | The quality mesh generated by switches '-pq1.2a0.0001', 34484 points, 186480 tetrahedra, 20900 boundary faces. |

Return to TetGen Command line switches page.

Return to TetGen home page.

Hang Si