smbinterp/interp/grid/qhull.py

16 lines
349 B
Python
Raw Normal View History

def parse_qhull_file(filename, verbose=False):
f = open(filename, 'r')
if verbose:
print 'filename: ', filename
degree = int(f.readline().strip())
print "degree:", degree
print "number of points", f.readline().strip()
verts = []
for p in f:
v = [float(i) for i in p.strip().split()]
verts.append(v)
return verts