[OpenSCAD] STL problem - globoid worm gear system

Parkinbot rudolf at parkinbot.com
Mon Jan 1 11:43:20 EST 2018


I wouldn't mix up mesh repair for input and mesh coarsing for output. 
For output, where you start with a supposedly valid representation, it is as
easy as merging two vertices too close to be distiguishable by the used
output format into one and suppressing the two facets affected by this

As the code and STL excerpt below show, STL output is done on the basis of 6
valid decimal digits, while a single (23 bit mantissa) can express the range
-3,40282347 to 3,40282347 which is obviously almost 8.5 decimals. Therefore
any proper STL output must have a coarsening step in the proposed way. I
don't know how OpenSCAD actually deals with it internally, but if I had to
implement it, I would use a compare of the 6 digit decimal representation or
at least a minimal distance criterion that sufficiently covers this loss of

cube(sqrt(2)); translate([100, 0, 0]) cube(sqrt(2)); 

facet normal 0 -1 -0
    outer loop
      vertex 1.41421 0 1.41421
      vertex 0 0 0
      vertex 1.41421 0 0
  facet normal -1 0 0
    outer loop
      vertex 100 0 0
      vertex 100 1.41421 1.41421
      vertex 100 1.41421 0

Sent from: http://forum.openscad.org/

More information about the Discuss mailing list