Rhinocommon boolean difference between breps problem

Hello everybody,
I’ve been experimenting things with boolean differences and I’m generally experiencing good results.
But on the attached example there’s a condition I can’t really understand.
I’m doing it by code but doing it manually leads to the same result.
This is the line of code btw
Dim cuttedBrep As Brep() = Brep.CreateBooleanDifference(solid, bs, tolerance, True)
On the front view I indicated 3 conditions.

I always subtract the lower brep box from the upper brep which has surfaces etc.
On the left and right situations subtraction gives me the output I expect. But in the centre something strange happens.
The only difference of the 3 cases is the position of the lower box…
Any idea?
Thank you!

report.3dm (3.6 MB)

Hi @fabiopasquarell,

I’m not sure what is going on. So I’ve logged the issue so we can take a closer look.


– Dale

Cheers Dale,
during this week I’ve been investigating a bit about this issue and I’ve been trying a few alternative routes.
One of these implied calling the brep intersection from Rhinocommon.
On the failed boolean difference case the brep intersection function originates open curves, while in the other two (working) cases brep intersection originates closed curves… maybe this could help.
Anyway, thank you for your reply.