December 29, 2020

3D Printing - Units

The simple truth is that the world of 3D printing is metric.

This isn't strictly true, but let's look at this a bit.

FreeCAD is metric at heart. It has made some attempt to allow the user to use inches, but it is buggy and inconsistent. My advice is that if you are going to use it, go metric, but there is a better way.

Cura is stubbornly metric. If you give it an STL file in inches, it will be confused. When I did give Cura a file in inches (my 1 by 0.5 by 0.25 brick) Cura announces that is is scaling by 10000 percent, and shows the object to be 100 by 50 by 25 mm. The authors are literally stubborn and reluctantly admit there is a plugin to perform english to metric conversion when an STL file is input. Cura often segfaults, so these are clearly not the sharpest people on the planet. I have decided not to fight with Cura about this and to let it live in its metric world where it is comfortable.

OpenSCAD is unit agnostic, which is in many ways ideal. It neither knows or cares what units you are working with. What I have decided to do is to work metric, but use variables to specify dimensions in inches and then scale them to millimeters. This yields a metric STL file that Cura is happy with.

My Creality Ender 3 printer works fine given a gcode file with millimeter units. The "Marlin" flavor of gcode has a G20/G21 command to indicate english or metric. G20 indicates units in inches, G21 indicates units in millimeters. I never see this in the gcode file generated by Cura and have no idea if it is possible to specify G20 and print a gcode file with units in inches.


Have any comments? Questions? Drop me a line!

Adventures in Computing / tom@mmto.org