Usage#
Basic I/O#
import polyxios as px
# Read any supported format
mesh = px.read("brain.vtk")
# Inspect
print(mesh.vertices.shape) # (n_verts, 3)
print(len(mesh.element_types)) # number of elements
# Write to a different format
px.write(mesh, "brain.ply")
px.write(mesh, "brain.vtp")
Format-specific options#
px.write(mesh, "brain.vtk", binary=True)
px.write(mesh, "brain.ply", binary=True, endian="little")
Every codec’s own options are listed on its page under Supported formats.
Where to go next#
Supported formats - the twenty-five supported formats, one page each
Lazy loading - reading files larger than RAM
Transforms - filtering, cleaning and merging meshes
Command line interface (pxios) - the
pxioscommand linePlugin system - teaching polyxios a new format