the qdelaunay app doesn't alway display all faces for a point. lame. I worked around it by creating the point-> face relationships manually. There is a max recursion something happeneing when I try to save so pickle. look into this. I spent some time writing a visualizer for blender. 10 lines of code. simple stuff. next steps would be to move the KDTree into the mesh object. GOOD LUCK (me)!! --HG-- rename : bin/grid_driver.py => bin/grid_random.py rename : bin/grid_driver.py => bin/grid_regular.py
23 lines
459 B
Python
Executable File
23 lines
459 B
Python
Executable File
#!/usr/bin/python
|
|
|
|
import sys
|
|
import pickle
|
|
|
|
from grid import simple_rect_grid, simple_random_grid
|
|
|
|
pfile = '/tmp/grid_regular.p'
|
|
qfile = '/tmp/grid_regular.txt'
|
|
|
|
if __name__ == '__main__':
|
|
try:
|
|
resolution = int(sys.argv[1])
|
|
if resolution > 200:
|
|
raise Exception
|
|
except:
|
|
resolution = 3
|
|
|
|
g = simple_rect_grid(resolution, resolution)
|
|
g.construct_connectivity()
|
|
open(qfile, 'w').write(g.for_qhull())
|
|
pickle.dump(g, open(pfile, 'w'))
|