DracoPy is a Python wrapper for Google's Draco Mesh Compression Library, enabling efficient encoding and decoding of 3D mesh data. It supports common formats like OBJ and PLY (via in-memory mesh objects). The current version is 2.0.0, with releases occurring infrequently, often coinciding with upstream Draco library updates or significant API overhauls.
pip install dracopyVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to create a simple 3D mesh using NumPy arrays, encode it into Draco compressed bytes, and then decode it back into a `DracoMesh` object. It highlights the use of NumPy for mesh data, which is standard in version 2.0.0 and above.
Ensure all mesh data passed to `DracoMesh` or assigned to its attributes are NumPy arrays. Convert existing lists using `np.array(your_list)`.
Users must now handle file I/O explicitly. Read file content into bytes before passing to `dracopy.decode()` and write `dracopy.encode()` output bytes to a file manually. For example: `with open('mesh.drc', 'rb') as f: mesh_bytes = f.read(); decoded_mesh = dracopy.decode(mesh_bytes)`.Ensure your system has the necessary build tools (e.g., C++ compiler, CMake) if wheels are not provided. Check the official GitHub repository for more specific build requirements for your platform. Consider using a common Python version (3.8-3.10) for which wheels are typically provided.
These parameters are no longer supported. If you were using them, re-evaluate how you are representing and handling custom attributes. The current `DracoMesh` structure focuses on standard mesh components (vertices, faces, normals, colors, uvs).
No dependency data recorded yet.