Boolean union and difference reversed

I’m getting this really weird case where for two intersecting breps, a union command returns the difference of the two breps, and a difference command returns the union of the two breps. This is occurring in both SR10 and SR9. I cannot reproduce the bug using simple shapes in a new document, it only seems to occur in a small subset of my builds (which are being generated with python). The swapped union/difference behavior is occurring even when the GUI is used to issue the commands.

Another interesting note is that when generating normal vectors from the main surface, the normal directions were flipped from what is usual, i.e., normal = -normal.

Model file attached. There are three separate breps in which the reversed behavior is happening.

What could cause this?

union-difference-bug.3dm (2.0 MB)

Hi Pickledgator,

Have a look at this page:
especially the section named “Boolean operations on open objects”

To fix your file: flip the direction of the sole object, it has open edges and the direction is pointing inward.


I just selected all ctrlA and bu. worked just fine.

The indented lettering after a Boolean union is due to the naked edges in the large polysurface. Use ShowEdges>naked edges to see the junctures that have gaps. You can fix this by Exploding this polysurface and then changing the Unit tolerance for the file in Options>Units to .01 instead of .001, then Join and you’ll get a closed solid. Booleans will work as expected after that.

Of the thousands of automated builds I’ve run, this is the first time I’ve had a configuration where the large polysurface had a naked edge leftover. Increasing the join tolerance solved the problem. Thanks guys.