working on the guarantee simplex routine. I have a test case to try it out against, and need to look at visiting neighbors of faces adjacent to points.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from Blender import *
|
||||
import bpy
|
||||
|
||||
from grid.test3d import rect_grid
|
||||
from grid.DDD import rect_grid
|
||||
|
||||
g = rect_grid(10, 10, 20)
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
"""
|
||||
Name: 'qhull mesh display'
|
||||
Blender: 249
|
||||
Group: 'Add'
|
||||
Tooltip:'this lets you display a qhull mesh'
|
||||
"""
|
||||
from Blender import *
|
||||
import bpy
|
||||
|
||||
from grid.DDD import rect_grid
|
||||
|
||||
def draw_file(filename):
|
||||
f = open(filename, 'r')
|
||||
print 'filename: ', filename
|
||||
print "degree:", f.readline().strip()
|
||||
print "number of points", f.readline().strip()
|
||||
|
||||
verts = []
|
||||
for p in f:
|
||||
v = [float(i) for i in p.strip().split()]
|
||||
if len(v) == 2:
|
||||
v.append(0.0)
|
||||
verts.append(v)
|
||||
|
||||
me = bpy.data.meshes.new('points')
|
||||
me.verts.extend(verts)
|
||||
# me.faces.extend([i.verts for i in p.faces.itervalues()])
|
||||
scn = bpy.data.scenes.active
|
||||
ob = scn.objects.new(me, 'points_obj')
|
||||
|
||||
Window.FileSelector(draw_file, 'input file')
|
||||
Reference in New Issue
Block a user