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

William Adams will.adams at frycomm.com
Mon May 20 09:13:56 EDT 2019

I was trying to work through this a while back --- wanted to provide a unit
setting in the customizer and it was rather problematic.

On 19.05.2019 18:33, Kevin Toppenberg wrote:
> function inch(i) = 25.4*i;
> cube([inch(1), inch(1), inch(1)]);

That would probably be better than what I achieved, but the problem was
that in addition to dimensions  of the project itself, tooling needed to be
scaled as well.

I'm currently leaving OpenSCAD to the default of millimeters and working on
a front-end for it which will handle units more gracefully.


On Sun, May 19, 2019 at 9:17 PM MichaelAtOz <oz.at.michael at gmail.com> wrote:

> leebc wrote
> > I have been finding, however, that 1 unit in the game world, is
> > aproximately 1 meter, so I change my scale factor to inch_to_mm=2.54/100;
> > this was very helpful, and I'm glad I chose to scale everything.
> That may be setting you up or trouble.
> You 24"/609.6mm top is the stored as 0.6096, and smaller details, say screw
> hole for draw handle 1/8"/3.175mm is stored as 0.003175.
> OpenSCAD gets a bit flaky down in such small number scales, with floating
> point conversion losing accuracy.
> -----
> Admin - email* me if you need anything, or if I've done something stupid...
> * click on my MichaelAtOz label, there is a link to email me.
> Unless specifically shown otherwise above, my contribution is in the
> Public Domain; to the extent possible under law, I have waived all
> copyright and related or neighbouring rights to this work. Obviously
> inclusion of works of previous authors is not included in the above.
> The TPP is no simple “trade agreement.”   Fight it!
> http://www.ourfairdeal.org/   time is running out!
> --
> Sent from: http://forum.openscad.org/
> _______________________________________________
> OpenSCAD mailing list
> Discuss at lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20190520/6a54219e/attachment.html>

More information about the Discuss mailing list