smbinterp/interp/grid/smcqdelaunay.py
Stephen Mardson McQuay 2db4169bfa major refactoring
--HG--
rename : lib/baker/__init__.py => interp/baker/__init__.py
rename : lib/grid/DD.py => interp/grid/DD.py
rename : lib/grid/DDD.py => interp/grid/DDD.py
rename : lib/grid/__init__.py => interp/grid/__init__.py
rename : lib/grid/qhull.py => interp/grid/qhull.py
rename : lib/grid/simplex.py => interp/grid/simplex.py
rename : lib/grid/smcqdelaunay.py => interp/grid/smcqdelaunay.py
rename : lib/baker/tools.py => interp/tools.py
2010-10-22 16:10:58 -06:00

24 lines
578 B
Python

#!/usr/bin/python
from subprocess import Popen, PIPE
def get_qdelaunay_dump(g):
cmd = 'qdelaunay Qt f'
p = Popen(cmd.split(), bufsize=1, stdin=PIPE, stdout=PIPE)
so, se = p.communicate(g.for_qhull())
for i in so.splitlines():
yield i
def get_qdelaunay_dump_str(g):
return "\n".join(get_qdelaunay_dump(g))
def get_index_only(g):
cmd = 'qdelaunay Qt i'
p = Popen(cmd.split(), bufsize=1, stdin=PIPE, stdout=PIPE)
so, se = p.communicate(g.for_qhull())
for i in so.splitlines():
yield i
def get_index_only_str(g):
return "\n".join(get_index_only(g))