Skip to content

Encoding does not return resulting faces and points count #18

@cansik

Description

@cansik

I think it would make sense to be able to get the resulting faces and points count from the encode_mesh_to_buffer method.

Currently I am writing a tool to create gltf files from mesh sequences and there I am adding mesh compression with this library. To correctly set the faces and vertices count, I need to know them after the compression. What I do as a workaround is just decode it after encoding, but this is a bit a waste of time and resources:

encoded_blob = bytearray(DracoPy.encode_mesh_to_buffer(encoded_points, encoded_triangles))

# workaorund to get point & faces size back
decoded = DracoPy.decode_buffer_to_mesh(encoded_blob)
triangles_size = len(decoded.faces)
pts_size = int(len(decoded.points) / 3)

Would it be possible to somehow return them?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions