[OpenSCAD] General approach

arnholm at arnholm.org arnholm at arnholm.org
Mon Jul 8 07:36:51 EDT 2019


On 2019-07-08 12:44, nop head wrote:
> Yes but OpenSCAD gains zero advantage from this because it converts
> back to doubles and snaps to a grid and then feeds the results back to
> CGAL.

Correct (on zero advantage).

> If Carve can do booleans in floating point then OpenSCAD will simply
> feed in floats and get floats back. There would be no need to snap to
> a grid and if it works in floats, rather than doubles, STL export will
> work.

Carve works in native double precision. I have implemented STL export by 
casting to float (i.e. to single precision) at the point of writing to 
*binary* file. Single precision in *binary* STL is another aspect of STL 
(in addition to the polygon soup issue) that makes it unsuitable for 
model exchange between modellers, including the case where the exporter 
and importer application is the same (OpenSCAD). You lose more precision 
using STL than the difference between double precision and 'rational 
numbers'. Single precision is equivalent to just 6-7 significant digits.

Carsten Arnholm



More information about the Discuss mailing list