VTK Files

oSP3D supports the simple legacy VTK file format specification defined in [8]. Support is limited to the UNSTRUCTURED_GRID dataset type only.

A typical file extension for simple legacy VTK input files is .vtk. The oSP3D simple legacy VTK import interface accepts all file extensions and does not distinguish between them. As described in [8], the input file consists of five basic parts in the following order:

  1. File version and identifier

  2. Header that can be used to describe the data and to include any other pertinent information

  3. File format

  4. Dataset structure

  5. Dataset attributes

The definition of the finite element mesh must be given in the last two parts.

Compared to the simple legacy VTK Syntax in [8], the oSP3D simple legacy VTK import interface supports only some of its syntax elements. The following list, not exhaustive, includes some limitations:

  • All parts are required

  • Only the ASCII file format is supported.

Due to the VTK input interface limitations, each passed simple legacy VTK input file must contain a non-empty model data definition. This definition can be given only with the keywords and their parameters in the following table. All other keywords are ignored.

KeywordDescriptionSupported ParametersComments
ASCIIDefines the file format typeThe format type BINARY is not supported and leads to an exception.
DATASETStarts the description of the geometry and topologyUNSTRUCTURED_GRID
POINTSDefines the geometryn
CELLSDefines an element directly by specifying its nodesn
CELL_TYPESDefines the element typenTYPE support is limited to the linear cell types VTK_TRIANGLE, VTK_PIXEL, VTK_QUAD, VTK_TETRA, VTK_VOXEL, and VTK_HEXAEDRON. Other TYPE values are ignored.


Note:  The oSP3D installation includes a simple VTK input file: vtk.vtk. For more information, see Input File Examples.