Supported formats#
polyxios ships twenty-five codecs across thirty-four extensions. Each is registered by
extension, so polyxios.read() picks the right reader from the filename — pass
fmt= to override it.
Every page below summarises the format’s specification, notes where polyxios extends or deviates from it, and links to the authoritative document.
VTK Legacy .vtk
Serial single-dataset format with an ASCII header naming POINTS, CELLS and CELL_TYPES; ASCII or binary body.
VTK RectilinearGrid .vtr
XML VTK file for grids with independent per-axis coordinate arrays; appended or inline base64 data.
VTK PolyData .vtp
XML VTK file for points, lines, polygons and strips, with named point and cell data arrays.
Wavefront OBJ .obj
Line-oriented ASCII geometry: v/vn/vt records and f faces with 1-based, optionally negative indices.
Stanford PLY .ply
Self-describing element lists declared in an ASCII header, followed by ASCII or packed binary property data.
STL .stl
Unstructured triangle soup with a normal per facet and no vertex sharing; ASCII or 80-byte-header binary.
OFF .off
An OFF magic line, a counts line, then vertices and faces; ST/C/N/4 prefixes add texture, colour and normals.
Abaqus .inp
Keyword-driven input deck: *NODE and *ELEMENT carry the mesh, *NSET and *ELSET the named collections.
AVS-UCD .avs
A five-integer counts line, then node records and cells keyed by a shape word, then optional data sections.
Medit binary .meshb
A stream of keyword-indexed fields; typed entity blocks carry node indices plus a trailing reference tag.
DOLFIN / FEniCS XML .xml
A small XML tree whose celltype names the element; every vertex and cell is explicitly indexed and 0-based.
FLAC3D .f3grid
Keyword-led ASCII records: G gridpoints, Z zones, F faces, with ZGROUP and FGROUP naming the regions.
Gmsh .msh
$Section blocks for format, nodes, elements and physical names; v4.1 regroups them per entity, so parsing forks.
Nastran .bdf .nas .fem
A deck of fixed-column cards in three coexisting field widths; GRID defines points, C* cards define elements.
Tecplot ASCII .tec
A VARIABLES list then ZONE records; DATAPACKING decides whether values interleave per node or per column.
SU2 .su2
Plain ASCII keyed by uppercase tokens; elements carry a VTK type code, and boundaries are declared per marker.
TetGen .ele + .node
Sidecar files sharing a basename; the first index in the file decides whether numbering is 0- or 1-based.
Well-Known Text .wkt
The OGC text encoding: a type keyword and parenthesised coordinate lists, with EWKT adding an SRID prefix.
VTK UnstructuredGrid .vtu
XML VTK file for an arbitrary mix of cell types, with connectivity, offsets and per-cell type codes.
VTK StructuredGrid .vts
Curvilinear grid: explicit coordinates, implicit connectivity, expanded to hexahedra on read.
VTK ImageData .vti
A uniform grid stored entirely as metadata: origin, spacing and extent, with no coordinate array at all.
MFEM mesh .mesh
Named sections keyed by a geometry type code; INLINE and NURBS variants carry a recipe, not a mesh.
Netgen .vol
Counted sections whose leading fields differ per section; bcnr / matnr indices come back as named tags.
UGRID (AFLR) .ugrid
Seven header counts and nothing else separating the sections; surface IDs sit between faces and cells.
Gaussian splat .splat
Headerless 32-byte records: position, scale, colour and a packed rotation quaternion. Points only, no elements.
Parallel and multi-block meta-files#
.vtm, .pvtu, .pvts, .pvti, .pvtp and .pvtr are registered too,
but they hold no geometry — only references to sub-files. Reading one raises
UnsupportedFormatError with a pointer to
examples/read_parallel_vtk.py, rather than failing with a parse error further in.
Writing them is not supported.