From e36958abf409e249faaf8da14d0d10a21769fd36 Mon Sep 17 00:00:00 2001 From: Nico Kemnitz Date: Wed, 27 Jul 2022 11:29:14 +0200 Subject: [PATCH] fix(meshing): handle new DracoPy.decode_buffer_to_mesh format --- pychunkedgraph/meshing/meshgen.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pychunkedgraph/meshing/meshgen.py b/pychunkedgraph/meshing/meshgen.py index b38f76191..c2ae60ce8 100644 --- a/pychunkedgraph/meshing/meshgen.py +++ b/pychunkedgraph/meshing/meshgen.py @@ -45,14 +45,13 @@ def decode_draco_mesh_buffer(fragment): except ValueError as exc: raise ValueError("Not a valid draco mesh") from exc - assert len(vertices) % 3 == 0, "Draco mesh vertices not 3-D" - num_vertices = len(vertices) // 3 + num_vertices = len(vertices) # For now, just return this dict until we figure out # how exactly to deal with Draco's lossiness/duplicate vertices return { "num_vertices": num_vertices, - "vertices": vertices.reshape(num_vertices, 3), + "vertices": vertices, "faces": faces, "encoding_options": mesh_object.encoding_options, "encoding_type": "draco", @@ -1304,7 +1303,7 @@ def chunk_initial_sharded_stitching_task( "node_id": np.uint64(frag_to_fetch), } ) - except: + except KeyError: pass if len(old_fragments) > 0: draco_encoding_options = None