You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

15 lines
482 B

import meshio
import numpy as np
mesh = meshio.read(
'/home/cflin/MatlabCode/TetWild/build/wrench_init_.msh', # 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
)
np.savetxt('TV.txt', mesh.points, fmt='%e')
np.savetxt('TT.txt', mesh.cells[0]{1})
# mesh.points, mesh.cells, mesh.cells_dict, ...
# mesh.vtk.read() is also possible