File Formats
The current file formats supported by meshio 1 are
Abaqus (
.inp
), ANSYS msh (.msh
), AVS-UCD (.avs
), CGNS (.cgns
), DOLFIN XML (.xml
), Exodus (.e
,.exo
), FLAC3D (.f3grid
), H5M (.h5m
), Kratos/MDPA (.mdpa
), Medit (.mesh
,.meshb
), MED/Salome (.med
), Nastran (bulk data,.bdf
,.fem
,.nas
), Netgen (.vol
,.vol.gz
), Neuroglancer precomputed format, Gmsh (format versions 2.2, 4.0, and 4.1,.msh
), OBJ (.obj
), OFF (.off
), PERMAS (.post
,.post.gz
,.dato
,.dato.gz
), PLY (.ply
), STL (.stl
), Tecplot .dat, TetGen .node/.ele, SVG (2D output only) (.svg
), SU2 (.su2
), UGRID (.ugrid
), VTK (.vtk
), VTU (.vtu
), WKT (TIN) (.wkt
), XDMF (.xdmf
,.xmf
).
The additionally supported file formats are
Add support for customized file formats
You can add support for your own customized file formats. For example, if you want to support .example
file formats.
To do that,
Create a
example.py
file in the folder additional_file_formatsImplement a function
def readexample_to_meshio(filepath):
, which reads the file fromfilepath
, then construct a meshio.Mesh object.Add
meshio.register_format("example", [".example"], readexample_to_meshio, {".example": None})
in the global spaceAdd
from . import example
inadditional_file_formats/__init__.py
You can check additional_file_formats/bgeo.py as an example.