[OpenSCAD] Any thoughts on using units other than millimeters?

Kevin Toppenberg kdtop3 at gmail.com
Sun May 19 12:33:43 EDT 2019


I know that OpenScad doesn't formally have units.  But if I make an object:

cube([10,10,10]);

and export it to STL and print it on a 3D printer, it comes out 10x10x10 mm.

Normally I would really like this. But lately I have been making some parts
as models for things that I will ultimately machine into metal.  And
because I live in the US, everything here seems to be be in stuck in the
Imperial system.  So to make an object 1"x1"x1", I do this.

function inch(i) = 25.4*i;
cube([inch(1), inch(1), inch(1)]);

And while this is perfectly usable, it would be nice if was a switch that
could change the units from mm to something else.  This means that the
on-screen scale would need to change also.

E.g.
$imperial=1

Has this already been considered?

Thanks
Kevin T
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20190519/88649bdc/attachment.html>


More information about the Discuss mailing list