Grasshopper Boolean Difference failing


I would like to ask if there is any solution for boolean difference.
For quite some time I am seeking a solution that would result in a proper boolean difference.
In most case I have cuts that have coincident brep edges and I really cannot avoid that…

I have multiple cases like that, tolerance changing, scaling elements a little bit, does not really help.

Following is an example, all cuts are done more or less currectly then one beam fails: (3.9 MB)

Maybe I’m missing something but the file you posted does not contain all cutters.

1 Like

Hello @Petras_Vestartas , I noticed that a brep is flipped causing the error, how did you generate that brep?

a dirty way to fix it :grimacing:

1 Like

It seems to work once I changed my code a little bit, it seems the issue was not in a boolean difference.

Sorry for confusion.

1 Like

Wow, that is extremely subtle. How is it possible that a “Closed Brep” can be flipped?
I’m surprised that SDiff works at all with so many cutters. But SUnion also fails until the offending brep is flipped. :roll_eyes:

Yup, I always need to add these lines:

And I still wonder why this one happened.

1 Like

SplitKinkyFaces() :exclamation: :rofl: How does a flipped “Closed Brep” even happen? :man_facepalming:


full size:

When a closed solid polysurface is created in Rhino, SpliKinkyFaces and Brep.Flip are automatically called, so these boolean operations don’t fail (or at least, not because of that).

But not in Grasshopper. I’ve made my own component for that - two lines of code really - but I really wish it was a native thing.

1 Like

Why SolidOrientation returns Outward? or how can this be fixed once generated breps? (81.4 KB)

I have to say this is a mystery. Giving a flipped Brep make the Solid difference work as expected :man_facepalming:

This Brep has 5 of its 6 faces oriented inwards, with the one outwards having its BrepFace.OrientationIsReversed to true.
Somehow this results in the orientation being computed as Outwards… I don’t get it.

Apologies for using ‘Flatten’ in my previous post as it fails when data trees have branches!

Better? (below) It applies the flip fix to all branches of matched geometry. Best viewed in preview mode, when selecting one or two ColorBa components.

BooleanDifference_2023Jun28b2 (3.9 MB)