diff --git a/tricco/cubulation_functions.py b/tricco/cubulation_functions.py index 1abc9d4dd379dbf35c4e762144906c00be47fa86..344cd65a2d85599deb85c94496c30637b446e272 100644 --- a/tricco/cubulation_functions.py +++ b/tricco/cubulation_functions.py @@ -142,13 +142,12 @@ def cubing_next_round(cube_coordinates, visited_triangles, outmost, edge_colours # list for triangles that will be outmost in next iteration new_outmost = [] - + for old in outmost: # consider all EnhancedTri's at the border of visited for neigh in get_neighbors_of_cell(old.triangle ): # consider all neighbours new = EnhancedTri(neigh, 0) - if new.triangle == -9999: # use feature: triangles at the grid border claim to be adjacent to -9999 - break - else: + + if new.triangle != -9999: # ommit missing triangles that occur at the grid border (marked by -9999) if new.triangle not in visited_triangles: # EnhancedTri new has no cube_coordinate yet # add new to new_outmost for next round hereafter and update visited_triangles