2cf9a0b574
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
12 lines
312 B
Python
12 lines
312 B
Python
import pickle
|
|
|
|
from Blender import *
|
|
import bpy
|
|
|
|
p = pickle.load(open('/tmp/grid_driver.p', 'r'))
|
|
me = bpy.data.meshes.new('points')
|
|
me.verts.extend([[v[0], v[1], 0] for v in p.points])
|
|
me.faces.extend([i.verts for i in p.faces.itervalues()])
|
|
scn = bpy.data.scenes.active
|
|
ob = scn.objects.new(me, 'points_obj')
|