fixed bug where faces_for_vert came back changed for subsequent calls to get_containing_simplex (was adding/removing from list alias, now I copy the list).
This commit is contained in:
parent
99b7dd6997
commit
e8d709ee66
@ -50,7 +50,7 @@ class grid(object):
|
||||
|
||||
simplex = None
|
||||
checked_faces = []
|
||||
faces_to_check = self.faces_for_vert[closest_point]
|
||||
faces_to_check = list(self.faces_for_vert[closest_point])
|
||||
|
||||
attempts = 0
|
||||
while not simplex and faces_to_check:
|
||||
@ -66,14 +66,14 @@ class grid(object):
|
||||
simplex = cur_face
|
||||
continue
|
||||
|
||||
new_facest = []
|
||||
for neighbor in cur_face.neighbors:
|
||||
if (neighbor not in checked_faces) and (neighbor not in faces_to_check):
|
||||
faces_to_check.append(neighbor)
|
||||
|
||||
if not simplex:
|
||||
raise AssertionError('no containing simplex found')
|
||||
raise Exception('no containing simplex found')
|
||||
|
||||
log.debug("simplex vert indicies: %s" % simplex.verts)
|
||||
R = self.create_mesh(simplex.verts)
|
||||
|
||||
log.debug('total attempts before finding simplex: %d' % attempts)
|
||||
@ -106,7 +106,7 @@ class grid(object):
|
||||
|
||||
# and some UNIQUE extra verts
|
||||
(dist, indicies) = self.tree.query(X, simplex_size + extra_points)
|
||||
log.info("extra indicies: %s" % indicies)
|
||||
log.debug("extra indicies: %s" % indicies)
|
||||
|
||||
unique_indicies = []
|
||||
for index in indicies:
|
||||
@ -196,13 +196,12 @@ class delaunay_grid(grid):
|
||||
simplex = cur_face
|
||||
continue
|
||||
|
||||
new_facest = []
|
||||
for neighbor in cur_face.neighbors:
|
||||
if (neighbor not in checked_faces) and (neighbor not in faces_to_check):
|
||||
faces_to_check.append(neighbor)
|
||||
|
||||
if not simplex:
|
||||
raise AssertionError('no containing simplex found')
|
||||
raise Exception('no containing simplex found')
|
||||
|
||||
R = self.create_mesh(simplex.verts)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user