weldr is a Rust library and command-line tool to manipulate LDraw files (format specification), which are files describing 3D models of LEGO®* pieces.
The 📦 weldr-bin
crate contains the weldr command-line tool ⚙ weldr
, an executable to manipulate LDraw files and convert them to other formats (currently: glTF 2.0).
Note: For the underlying Rust library used by this command-line tool, see the 📦 weldr
crate instead.
Convert an LDraw file to a glTF 2.0 file:
weldr convert gltf 5-8cyli.dat --output 5-8cyli.gltf
⚙ weldr
is a frontend for a set of subcommands to manipulate LDraw files. The full help and list of available subcommands can be displayed with:
weldr --help
Topical help for a specific subcommand (e.g. "convert
") can be displayed with:
weldr <SUBCOMMAND> --help
Currently the convert
subcommand is the only one available:
weldr convert [OPTIONS] <FORMAT> <INPUT>
The 📦 welder-bin
crate is available on crates.io and can be installed with cargo:
cargo install weldr-bin
Prebuilt binaries for supported platforms are available on the GitHub Releases page.
The official LDraw catalog of parts is available at https://www.ldraw.org/library/updates/complete.zip. Download the catalog and unzip it somewhere locally, then use the --catalog-path
/-C
option to specify the location where the root folders are located (the p
and parts
folders), to allow ⚙ weldr
to resolve files and all their sub-file references. By default the current working directory is used.
Example:
> curl https://www.ldraw.org/library/updates/complete.zip --output complete.zip
> unzip complete.zip -d ./ldraw_parts
> weldr convert -C ./ldraw_parts 6143.dat gltf
weldr is tested with rustc
version 1.56, stable, and beta, although older versions may work, but have never been tested.
LDraw™ is a trademark owned and licensed by the Estate of James Jessiman, which does not sponsor, endorse, or authorize this project.
*LEGO® is a registered trademark of the LEGO Group, which does not sponsor, endorse, or authorize this project.
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE2 or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.