Can't comment on those, sorry.
Meshio reads / writes many different formats;
an example --
""" meshio loopback test """
import numpy as np
import meshio # https://github.com/nschloe/meshio
import meshzoo # https://github.com/nschloe/meshzoo
def pr( txt, x ):
print( "%s: %s \n%s .T" % (
txt, x.shape, x.T ))
np.set_printoptions( threshold=20, edgeitems=10, linewidth=120,
formatter = dict( float = lambda x: "%.2g" % x )) # float arrays %.2g
print( 80 * "▄" )
#...............................................................................
points, cells = meshzoo.tube( n=10 )
pr( "points", points )
pr( "cells", cells )
cellsdict = {"triangle": cells} # line triangle tetra
mesh = meshio.Mesh( points, cellsdict )
# loopback test, write read --
mesh.write( "tmp-tube.off" )
print( "\nmeshio.read should be the same --" ) # reordered ?
meshin = meshio.read( "tmp-tube.off" )
points = meshin.points
pr( "points", points )
for typ, data in meshin.cells_dict.items():
pr( typ, data )