cleaned up the method (removed print statements) i'm ready to now add this method as an option to the mesh object
This commit is contained in:
+9
-13
@@ -117,30 +117,26 @@ class grid(object):
|
||||
if not self.faces:
|
||||
self.construct_connectivity()
|
||||
|
||||
# get closest point
|
||||
(dist, indicies) = self.tree.query(X, 2)
|
||||
smplx = None
|
||||
|
||||
simplex = None
|
||||
for i in self.facets_for_point[indicies[0]]:
|
||||
if i.contains(X, self):
|
||||
smplx = i
|
||||
simplex = i
|
||||
break
|
||||
|
||||
if not smplx:
|
||||
if not simplex:
|
||||
raise AssertionError('no containing simplex found')
|
||||
print "containing verts:", smplx.verts
|
||||
smplx_set = set(smplx.verts)
|
||||
R = self.create_mesh(smplx.verts)
|
||||
simplex_set = set(simplex.verts)
|
||||
R = self.create_mesh(simplex.verts)
|
||||
|
||||
|
||||
s = []
|
||||
for c,i in enumerate(smplx.neighbors):
|
||||
print "neighbor %d: %s: %s" % (c, i.name, i.verts)
|
||||
st = set(i.verts)
|
||||
s.append((st - smplx_set).pop())
|
||||
# s.append( [guy for guy in i.verts if not guy in smplx.verts])
|
||||
print s
|
||||
for c,i in enumerate(simplex.neighbors):
|
||||
s.extend([guy for guy in i.verts if not guy in simplex.verts])
|
||||
S = self.create_mesh(s)
|
||||
|
||||
print S
|
||||
return R, S
|
||||
|
||||
def run_baker(self, X):
|
||||
|
||||
Reference in New Issue
Block a user