ldraw-py
A utility package for creating, modifying, and reading LDraw files and data structures.
LDraw is an open standard for LEGO® CAD software. It is based on a hierarchy of elements describing primitive shapes up to complex LEGO models and scenes.
Installation
The ldraw-py package can be installed directly from the source code:
$ git clone https://github.com/michaelgale/ldraw-py.git
$ cd ldraw-py
$ python setup.py install
Usage
After installation, the package can imported:
$ python
>>> import ldrawpy
>>> ldrawpy.__version__
An example of the package can be seen below
from ldrawpy import LDRColour
# Create a white colour using LDraw colour code 15 for white
mycolour = LDRColour(15)
print(mycolour)
White
Requirements
- Python 3.7+
- toolbox-py
References
- LDraw.org - Official maintainer of the LDraw file format specification and the LDraw official part library.
- ldraw-vscode - Visual Studio Code language extension plug-in for LDraw files
Lego CAD Tools
- Bricklink stud.io new and modern design tool designed and maintained by Bricklink
- LeoCAD cross platform tool
- MLCAD for Windows
- Bricksmith for macOS by Allen Smith (no longer maintained)
- LDView real-time 3D viewer for LDraw models
LPub Instructions Tools
- Original LPub publishing tool by Kevin Clague
- LPub3D successor to LPub by Trevor Sandy
- Manual for Legacy LPub 4 tool (last version by Kevin Clague)
Authors
ldraw-py
was written by Michael Gale