Skip to content

Commit

Permalink
fix(meshing): handle new DracoPy.decode_buffer_to_mesh format
Browse files Browse the repository at this point in the history
  • Loading branch information
nkemnitz committed Sep 11, 2023
1 parent 2ec8bcf commit 1570c45
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pychunkedgraph/meshing/meshgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1570c45

Please sign in to comment.