Sunday, October 1, 2017

Converting LDD to standard 3D model files

I've wanted to make Lego Digital Designer files into 3D models or 3D printable models. It's not too terribly hard.

Steps
  1. From Lego Digital Designer, export the model as an LDraw file: File->Export Model, pick Ldraw-Files (*.ldr) 
  2. Open that ldr file in LeoCAD
  3. Export to Wavefront OBJ file.
  4. Import into Microsoft 3D Builder, select mm for import units.
  5. Repair
  6. Resize (Select size, make sure it's locked, change mm to % and pick 40%)
  7. Save as STL.
Notes

Note that scales in OBJ files vary, and LeoCAD apparently decided to use the LDraw Units instead of anything like mm or inches when exporting. So after importing, a "stud" is 20 mm instead of 8mm. That's why we have to resize them and scale the model to 40% in step 6.

Also note that the LeoCAD export uses the "nominal" sizes, so the model won't have any of the reductions in size that a real Lego brick does to allow for fit.  

In other words, a LeoCAD 1x2 brick would be 8mm x 16mm.  But a "real" Lego brick has .1mm removed from each side to allow for clearance.  So a real Lego 1x2 would be 7.8mm x 15.8 mm.

If you intend to 3D print your model and have it interface with "normal" Lego, you'll have to do something about those clearances as the model will be slightly too large in all dimensions.

If all you want is a "normal" brick, several programs generate Lego bricks for printing, such as my own Fancy Bricks OpenScad program on Thingiverse - https://www.thingiverse.com/thing:197171