2010-02-06 23:01:02 -08:00
|
|
|
#!/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
|
|
|
|
|
2010-02-07 19:23:19 -08:00
|
|
|
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))
|