meshio网格数据格式转换工具
meshio 是一个网格格式的输入/输出转换工具,既可以进行格式转换,也可以在 python 中调用相应函数。
支持以下格式的互转化:
- 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
)
用例
使用其中之一安装:
pip install meshio[all]
conda install -c conda-forge meshio
([all]
拉入所有可选依赖项。默认情况下,meshio 仅使用 numpy。)
然后可以使用命令行工具
meshio convert input.msh output.vtk # convert between two formats
meshio info input.xdmf # show some info about the mesh
meshio compress input.vtu # compress the mesh file
meshio decompress input.vtu # decompress the mesh file
meshio binary input.msh # convert to binary format
meshio ascii input.msh # convert to ASCII format
Python 中的用法:
import meshio
mesh = meshio.read(
filename, # string, os.PathLike, or a buffer/open file
# file_format="stl", # optional if filename is a path; inferred from extension
# see meshio-convert -h for all possible formats
)
# mesh.points, mesh.cells, mesh.cells_dict, ...
评论
PSVJS 数据格式验证工具
PorcoSchemaValidate(psv)psv 是一款轻量级 JS 数据格式验证工具,相比于其他功能齐备的验证工具,psv 的优势在于体积非常小,最开始的核心代码只有130行。因此 psv 非
PSVJS 数据格式验证工具
0
treeifyarrToTree 转换工具
treeify.js-v0.0.3(MIT)treeify是将一个数组(每个元素包含相同的特定的规则)转换为一个树对象的工具。ConstructorParameterstreeify(data, id
treeifyarrToTree 转换工具
0
x-JsonConvertToolJSON 转换工具
JsonConvertTool是使用javafx开发的一款Json转换工具,目前支持Json转Xml、Json转Java实体类、Json转JavaPath、Json转C#实体类、Json转Excel、
x-JsonConvertToolJSON 转换工具
0
jsonpipeJSON 转换工具
jsonpipe是一个把JSON转换成基于行的UNIX友好格式的工具。jsonpipe用Python编写,因此最好使用pip以下命令安装:pipinstalljsonpipe请注意,它需要Python
jsonpipeJSON 转换工具
0