removed pointless log lines, and reenabled a throw exception is attempts to find containing simplex goes past 200

This commit is contained in:
Stephen McQuay 2011-03-22 14:13:52 -06:00
parent 41261c96ce
commit 3c336ce869

View File

@ -29,10 +29,7 @@ class grid(object):
self.tree = KDTree(self.verts) self.tree = KDTree(self.verts)
if q != None: if q != None:
log.debug("found q")
self.q = np.array(q) self.q = np.array(q)
else:
log.debug("no q")
self.cells = {} self.cells = {}
self.cells_for_vert = defaultdict(list) self.cells_for_vert = defaultdict(list)
@ -58,8 +55,8 @@ class grid(object):
while not simplex and cells_to_check: while not simplex and cells_to_check:
attempts += 1 attempts += 1
# if attempts > 20: if attempts > 200:
# raise Exception("probably recursing to many times") raise Exception("Is the search becoming exhaustive?")
cur_cell = cells_to_check.pop(0) cur_cell = cells_to_check.pop(0)
checked_cells.append(cur_cell) checked_cells.append(cur_cell)