47. tetgen — read/write tetgen format files.

read/write tetgen format files.

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, nodes)
Write a tetgen .node file.
tetgen.writeSmesh(fn, facets, nodes=None, holes=None, regions=None)

Write a tetgen .smesh file.

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

tetgen.writeSurface(fn, nodes, 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.

Documentation

Previous topic

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

Next topic

48. tools — tools.py

This Page