Adjustable, or more liberal, "flatness" tolerance?

The sequence of screengrabs below shows the bottom slice for three variations of a pocket floor which is flat in Onshape. For scale, the long dimension of the pocket floor is 350 mm.

After the first result, I exported the STL for a look. Most of the floor vertices are at Z=n.2317. A few were n.233 or 1.3 microns high. A few were at n.2347 or 3 microns high. The left picture shows a slice of that STL re-imported in grid.space/kiri for a baseline.

In the STL I edited the highest points, n.2347, down to n.232 or 0.3 microns above the plane. That got the second result.

Back to the STL, I knocked the n.233 points (now the highest) down to n.2321 or 0.4 microns high (still the highest but less so). That got the clean result on the right.

So it looks like KM counts vertices up to at least 0.4 microns (1.1 ppm) high as part of the plane but not vertices 1.3 microns (3.7 ppm) high.

Ideally, Onshape’s STL would use exactly the same number for geometrically equivalent values. But IME that’s not a reliable assumption for convert-export functions in general.

Ideally, Kiri:Moto would always dismiss insignificant variations and always retain significant variations. But that’s a mind-reading problem.

As a feature request, how about one of:

  • a knob to tweak whatever parameter matters here (it does not appear to be “tolerance”)
    or
  • looser interpretation of “flat”? e.g. I’d guess that anyone reproducing meaningful Z variations within +/- 10 microns (<half a thou) over 500mm horizontal travel (20 ppm) probably uses more elaborate CAMware.

?.

Interesting. I would not have expected the Z vertices to be so far apart. In all the years I’ve been working with STL and Onshape, I haven’t seen this. Can you send me the STL? I will look into what a Z vertex tolerance would look like in code.

Ok. I just emailed the STL.

There is already a constant in the base geometry code that does this. I’ve tweaked it and it fixes this problem. Will push to production shortly.

Oh - looks like I didn’t actually say at the time: Great! Thanks. Appreciate the quick fix.