The -p Switch: Generates a CDT

The -p switch reads a piecewise linear complex (PLC) stored in file .poly or .smesh, which can specify vertices, facets, holes, regional attributes, and volume constraints. Generates a constrained Delaunay tetrahedralization (CDT) fitting the input.

If you don't specify the file extension, TetGen will look for a file having extension .poly or .smesh and use whichever one is available. For example, ``tetgen -p xxx'' opens the file named xxx.poly (if it doesn't exist, open the file xxx.smesh instead) and possibly also opens the file xxx.node; reads in the whole PLC; and generates a CDT into three files: xxx.1.node, xxx.1.ele, and xxx.1.face.

In combination with -q or -a switch, TetGen will generate a quality tetrahedral mesh of the PLC. -p is not compatible with -r, don't try to use them together.

Examples of Using the '-p' Switch

A piecewise linear complex (PLC) is described in file "bar.poly" (shown below).

The geometry is a rectangular bar. It consists of eight nodes and six facets (which are all rectangles). In addition, there are two boundary markers '-1' and '-2' associated to the leftmost facet and the rightmost facet, respectively.

The command line:

tetgen -p bar
produces the CDT of it into two files: bar.1.node, and bar.1.ele, and file bar.1.face contains all the boundary faces of this PLC, each face has a boundary marker.


Return to TetGen Command line switches page.
Return to TetGen home page.
Hang Si
2007-04-27