LDBoxer is a Windows command-line utility originally developed by Tore Eriksson to help you replace LDraw parts that have no visible studs or tubes with simpler boxes. This saves rendering time and CPU resources.
- Usage:
LDBoxer_2018h.exe ldraw_library_location ldraw_model_location_for_conversion
- Usage example:
LDBoxer_2018h.exe "F:\LDRAW" "F:\LDraw\models\car.dat"
Alternately, if you have Python installed on your system, you can execute the Python script directly.
- Usage example:
python3.exe "E:\LDBoxer.py" "F:\LDRAW" "F:\LDraw\models\car.dat"
Better yet, if you have PyPy installed, you can substitute it for CPython and gain a very nice speed boost.
- Usage example:
pypy3.exe "E:\LDBoxer.py" "F:\LDRAW" "F:\LDraw\models\car.dat"
There is also an optional -v
parameter which will print verbose information to the screen.
- Usage example:
pypy3.exe "E:\LDBoxer.py" "F:\LDRAW" "F:\LDraw\models\car.dat" -v
An example batch script is included.
- Extract this archive and copy the contents of the "LDBoxer\boxes\parts" folder into your "LDraw\parts" folder.
- Boxed parts need to go in the "LDraw\parts\b" folder. Boxed sub-parts need to go in the "LDraw\parts\s\b" folder.
- Many "top" and "bottom" variants of boxed parts are missing, and still need to be created. Still, most of the most common parts have been modeled.
- The spreadsheet "boxes_checklist.xlsx" was at one point used to keep track of which parts had box variants. This file may be outdated though, as I did not refer to it during my last round of editing.
- Boxed parts starting with "b" are substituted when the bottom of the original part is obscured by other parts.
- Boxed parts starting with "t" are substituted when the top of the original part is obscured by other parts.
- Boxed parts starting with "a" are substituted when both the top and the bottom of the original part are obscured by other parts.
- Some boxed parts may still have incorrect or missing back face culling (BFC) information. (I think I fixed all this recently.)
- Some boxed parts may be missing edge and conditional lines and need to be corrected.
- Not all boxed parts have "b", "t" and "a" variants.
- Need to create LGEO equivalents of all the boxed parts. However, I'm not sure how LDBoxer's sub-folder structure will behave in this context. We'll see.
- Need to start adhering more closely (or at all) to official parts header specifications.
- LDBoxer currently does not correctly process SNOT parts. Limited handling of SNOT parts should be possible in the future, however, if parts sharing the same SNOT orientation are all placed in the same sub-model.
- LDBoxer does not understand MPD model/sub-model hierarchy. It assumes all models are inlined or flattened.