smbinterp/bin/parse_gmsh.py

21 lines
362 B
Python
Raw Normal View History

#!/usr/bin/env python
import sys
2010-10-22 08:20:59 -07:00
import numpy as np
2010-10-23 15:57:44 -07:00
from interp.grid.gmsh import gmsh_grid
if __name__ == '__main__':
if len(sys.argv) != 2:
print >> sys.stderr, "usage: %s <gmsh file>" % sys.argv[0]
sys.exit(1)
2010-10-23 15:57:44 -07:00
g = gmsh_grid(sys.argv[1])
g.dump_to_blender_files()
2010-10-23 15:57:44 -07:00
X = np.array([0.2, 0.2, 0.0])
R = g.get_containing_simplex(X)
2010-10-23 15:57:44 -07:00
print g