mirror of
https://github.com/kristov/ldraw2stl.git
synced 2025-05-15 14:20:11 -07:00
There are two major changes here: 1) Previously I was inverting the winding of verticies only when calculating the normal. This was the wrong approach and I instead needed to invert the order of the verticies before calculating the normal. This is because most STL processing software (eg: Slic3r) will recalculate the normals based off the winding (correctly). 2) I *think* I am doing proper BFC handling now, although TBH the BFC handling logic in ldraw is super complex to me. See: https://www.ldraw.org/article/415 ("Rendering Engine Guidelines").
ldraw2stl
Convert LEGO LDraw files to STL, for super-sizing and 3d printing!!
-
Get the ldraw parts archive at :
wget http://www.ldraw.org/library/updates/complete.zip unzip complete.zip bin/dat2stl --file ldraw/parts/3894.dat --ldrawdir ./ldraw
-
Install LeoCAD so you can find your parts (optional)
-
Make a note of the .dat file name in LeoCAD, and then run:
bin/dat2stl --file /usr/share/ldraw/parts/3894.dat --ldrawdir ./ldraw --scale 4 > 3894.stl
For a 4X scale one of those!
Description
Languages
Perl
100%