Skip to content

Commit 11b2b37

Browse files
committed
fix: no mesh edge case
1 parent be60a6e commit 11b2b37

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

pychunkedgraph/meshing/manifest/multiscale.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,16 @@ def build_octree(
104104
octree[offset + 4] = end_empty
105105

106106
octree_node_ids[row_counter] = current_node
107-
if children.size == 1:
108-
# map to child fragment
109-
octree_fragments[row_counter] = mesh_fragments[children[0]]
110-
else:
111-
try:
107+
108+
try:
109+
if children.size == 1:
110+
# map to child fragment
111+
octree_fragments[row_counter] = mesh_fragments[children[0]]
112+
else:
112113
octree_fragments[row_counter] = mesh_fragments[current_node]
113-
except KeyError:
114-
# mark node empty
115-
octree[offset + 4] |= 1 << 31
114+
except KeyError:
115+
# no mesh, mark node empty
116+
octree[offset + 4] |= 1 << 31
116117

117118
for child in children:
118119
que.append((child, current_depth + 1))

0 commit comments

Comments
 (0)