scallop dome pyformex logo

Previous topic

49. export — Classes and functions for exporting geometry in various formats.

Next topic

51. tools — tools.py

[FSF Associate Member]

Valid XHTML 1.0 Transitional

50. tetgen — read/write tetgen format files.

Classes defined in module tetgen

Functions defined in module tetgen

tetgen.invalid(line, fn)

Print message for invalid line.

tetgen.readNodes(fn)

Read a tetgen .node file.

Returns a tuple of two arrays: nodal coordinates and node numbers.

tetgen.readElems(fn)

Read a tetgen .ele file.

Returns a tuple of 3 arrays:
elems : the element connectivity elemnr : the element numbers attr: the element attributes.
tetgen.readFaces(fn)

Read a tetgen .face file.

Returns an array of triangle elements.

tetgen.readSmesh(fn)

Read a tetgen .smesh file.

Returns an array of triangle elements.

tetgen.readSurface(fn)

Read a tetgen surface from a .node/.face file pair.

The given filename is either the .node or .face file. Returns a tuple of (nodes,elems).

tetgen.readNeigh(fn)

Read a tetgen .neigh file.

Returns an arrays containing the tetrahedra neighbours:

tetgen.writeNodes(fn, coords, offset=0)

Write a tetgen .node file.

tetgen.writeSmesh(fn, facets, coords=None, holes=None, regions=None)

Write a tetgen .smesh file.

Currently it only writes the facets of a triangular surface mesh. Coords should be written independently to a .node file.

tetgen.writeSurface(fn, coords, elems)

Write a tetgen surface model to .node and .smesh files.

The provided file name is the .node or the .smesh filename.

tetgen.nextFilename(fn)

Returns the next file name in a family of tetgen file names.

tetgen.runTetgen(fn)

Run tetgen mesher on the specified file.

The input file is a closed triangulated surface. tetgen will generate a volume tetraeder mesh inside the surface, and create a new approximation of the surface as a by-product.