scallop dome pyformex logo

Previous topic

15. geomtools — Basic geometrical operations.

Next topic

17. filewrite — Write geometry to file in a whole number of formats.

[FSF Associate Member]

Valid XHTML 1.0 Transitional

16. fileread — Read geometry from file in a whole number of formats.

This module defines basic routines to read geometrical data from a file and the specialized importers to read files in a number of well known standardized formats.

The basic routines are very versatile as well as optimized (using the version in the pyFormex C-library) and allow to easily create new exporters for other formats.

Classes defined in module fileread

Functions defined in module fileread

fileread.getParams(line)

Strip the parameters from a comment line

fileread.readNodes(fil)

Read a set of nodes from an open mesh file

fileread.readElems(fil, nplex)

Read a set of elems of plexitude nplex from an open mesh file

fileread.readEsets(fil)

Read the eset data of type generate

fileread.readMeshFile(fn)

Read a nodes/elems model from file.

Returns a dict:

  • node: a Coords with all nodes
  • elems: a list of Connectivities
  • esets: a list of element sets
fileread.extractMeshes(d)

Extract the Meshes read from a .mesh file.

fileread.convertInp(fn)

Convert an Abaqus .inp to a .mesh set of files

fileread.read_gambit_neutral(fn)

Read a triangular surface mesh in Gambit neutral format.

The .neu file nodes are numbered from 1! Returns a nodes,elems tuple.

fileread.read_gambit_neutral_hex(fn)

Read an hexahedral mesh in Gambit neutral format.

The .neu file nodes are numbered from 1! Returns a nodes,elems tuple.