smbinterp/lib/grid/smcqdelaunay.py
smcquay@cfdviz2 c5d8fff883 moved some files around to conform to python best practicies
--HG--
rename : lib/baker.py => lib/baker/__init__.py
rename : lib/tools.py => lib/baker/tools.py
rename : lib/grid.py => lib/grid/__init__.py
rename : lib/smcqdelaunay.py => lib/grid/smcqdelaunay.py
2010-03-08 13:05:42 -07: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))