MergeAllFaces bug?

In the attached file, MergeAllFaces won’t merge all faces, but if I DupBorder and PlanarSrf, I end up with the desired result. Is this a bug? Is MergeAllFaces using different tolerances than PlanarSrf?mergeface bug.3dm (145.5 KB)

your faces are microscopically not planar… select them and look at your gumball…there is a scale handle in the z-

click it scale to zero in the z and try mergeallfaces again. it works here.

I agree, sort of. Everything is done within a tolerance, right? And the outline created using DupBorder is also slightly non-planar, yet Rhino will put a planar surface in there b/c it’s within tolerance. So why not combine those surfaces that are also within tolerance? (Or, maybe they aren’t in tolerance? Not sure how to check.)

I’m guessing they are out of tolerance by a smidge…

It has happened to me a few times, I imagine the tolerance values might be slightly different for the “internal” processing of MergeAllFaces rather than DupBorder and PlanarSrf, which does work.

Actually the “IsPlanar” tolerance varies according to how the command was programmed. PlanarSrf is more tolerant than some other operations - because I guess the goal is to have it work as often as possible - whereas some other commands are stricter.

Attached is an example - it’s a 100mm square but one corner has been raised 0.0005mm - within the 0.001mm file absolute tolerance range. PlanarSrf makes a surface with it. SelPlanarCrv does not select it.

PlanarOrWhat.3dm (21.2 KB)

Then consider that a series of curves or surfaces that are just slightly out of planar but within tolerance themselves, can, when combined, make an object that is out of planar by more than the absolute tolerance because differences get added together.