A utility for converting LEGO (LDraw) files to glTF (.glb/.gltf).
Built on ldr_tools_blender, but designed to be a standalone tool without Blender dependencies.
uv add ldraw2mesh # with uv
pip install ldraw2mesh # with pipAn LDraw parts library is required to process LDraw files. Download it from https://www.ldraw.org/.
Set the LDRAW_LIBRARY_PATH environment variable to the path of your LDraw library:
export LDRAW_LIBRARY_PATH=/path/to/ldrawfrom ldraw2mesh import convert
# Convert an LDraw file to glTF
convert("model.ldr", "model.glb")ldraw2mesh model.ldr -o model.glbTo build from source, you need:
- Rust ≥ 1.85
uv
Clone the repository and run:
uv run maturin develop --uv