Bug: Boolean Difference creates weird Boolean Union instead

if those are open you first image was a bit misleading. i missed the micro mm which could have let me understand that clearly :man_shrugging:

well in that case i would clearly vote for nr1

open is open, closed is a solid or wannabe or call it what you like a clear differentiation.

Sometimes seeing things differently does not mean one person is correct and the other person is incorrect.

Boolean operations between solids in 3D space are well defined. However there is ambiguity as to how to define Boolean operations between solids and open surfaces in 3D space. The interpretations of both @encephalon and @pascal / @Helvetosaur are reasonable.

Encephalon’s interpretation is consistent with assuming an open surface is the result of shrinking a solid to zero thickness. With this interpretation the results of Boolean operations between a surface and a solid should be the same as limit as the thickness of one solid goes to zero of Boolean operations between two solids. With this interpretation the expected result of a Boolean difference operation is:

Pascal’s and Helvetosaur’s interpretation is a bit more complicated. It is consistent with assuming the surface is considered as part of the surface of a larger solid. The interior of that solid is defined by the normal direction of the surface, and the assumed solid contains a portion of the input solid. With this interpretation the expected result of of a Boolean difference operation is:

The first interpretation is the more obvious one to me but introduces a complication for Boolean unions which I’ll discuss in another post. The second interpretation may be obtained by a simple extension of the algorithm for Boolean operations between solids.

The first interpretation (encehalon’s) of Boolean operations between a surface and a solid results in a non-manifold object when used for a Boolean union. Non-manifold objects are best avoided in Rhino when possible.

The second interpretation (Pascal’s and Helvetosaur’s) of Boolean operations between a surface and solid result in an open surface when used for a Boolean union.

The two interpretations also have different results when used for Boolean intersection. The first results in a surface, and the second results in a closed volume. Both are valid objects in Rhino without complications.

As I said in the previous post neither interpretation is inherently “right” or “wrong”. Both are valid. The first one is more obvious to me as an observer, but if I had written code for operations between solids and then wanted to extend it to operations between solids and surface the second would be my choice.

Yes, exactly, that was my point…

-Pascal

For a Boolean intersection operation between a surface and a solid the first interpretation result is:

For a Boolean intersection operation between a surface and a solid the second interpretation result is:

@Pascal Similar to your requested TrimInside command, a command which would follow the first interpretation could be very useful.

TrimOutside?

-Pascal

Sounds reasonable.

I love above example regarding boolean operations and open polysurfaces:
_booleanDifference
from black polysurface, subtract with violett polysurface
4 different combination of normals and therefor results…

  • for basic user I think the advice is to use
    _trim and _split for open (poly)surfaces and to use boolean operations only on closed (Poly)Surfaces
  • for advanced users I really love, that rhino allows operations, especially _booleanDifference for open surfaces.
    I use it a lot, especially instead of trim and join to be faster. Please keep this feature.
  • If somebody uses booleanIntersect and booleanSplit on a combination of open and closed Breps - please give a use-case and explanation

Use BooelanTwoObjects to cycle through the possible results.

-Pascal

1 Like

what was the point? to communicate your situation unclear or to have open geometry?

i can not grasp if you are trying to be funny or are trying to communicate as ambiguously as possible :man_shrugging:t3: or if you are trying to communicate something and its just not coming over.

to be sure, when you have open geometry why would i close it with boolean difference, the other way when i have closed geometry why would i open it? simple logic.

Well, if something like this is going to happen, it would probably be good if there was an option inside/outside, or two different commands. If only one of the two is implemented, I’m sure someone will ask for the other right away… :stuck_out_tongue_winking_eye:

99.9% of my use of BooleanSplit is splitting closed objects with an open surface - to keep the results closed, obviously. Then I can just decide which part to throw away, if any. I use this procedure very often. I also use Wirecut the same way, always with KeepAll and then choosing which part to delete.

Boolean difference between a self intersecting pipe and open surfaces:

Thee selected pipes on the second screenshot are open surfaces. They only get subtracted from the part of the other pipe which intersects.

@pascal thinking about it once more and to further clear up the thoughts →

boolean difference should not add any surface but only subtract.

what it currently does on a single open surface is similar to what the command boss does where the result is intentionally, using boolean difference i can not say that adding more surface is in anyone’s interest.

why not call it boolean trim then. or hey make it easy keep it simple, call it boolean difference, in the software i used above the options on closed, open, single or whatever surfaces you throw at, are the following

Bildschirmfoto 2022-12-17 um 13.21.09

TrimOutside is not, I think, a huge advantage over plain old Trim, (right?) it’s the inside way that can be awkward. I suppose DelteCutters=Yes/No might be in the mix as well, or is deletion assumed?

-Pascal

Well, I was imagining multiple surfaces being cut with multiple cutters…

Or simply multiple surfaces being cut with a single cutter.

Yes, DeleteCutters should be in the mix.

more inconsistency with booleans:

nr 1 does the trick, but it leaves the rest marked grey behind. both surfaces are open so why would it not work like in case nr 2 where two closed polysurfaces interact?

CurveBoolean just works without complaining, though the process is a bit more involving due to having to select which parts, which in this case is usually an advantage but one could argue if the result shown below is wished that it should not also just work like a boolean difference.

i wonder how good old George would think about all that…

i certainly agree though it also has a lot to do with which thoughts one associates with it, something which progressively can equalise the view of everybody i assume, also it makes great sense to discuss what the usual function should look like, expecting results which are intuitive and consistent while ideally not necessarily having 5 different commands doing similar to same jobs.

The rules for how booleans work on open objects are pretty clear and simple, you just need to be aware of the normal directions. Trying to add a bunch more rules to their behavior is not going to make them more predictable.

As the other jim is always saying, booleans are just shortcuts for splitting and trimming. If the results seem ambiguous, don’t use them, who cares?

1 Like

i would say its the other way around. rather trying to simplify the logic.

well yeah… good idea. why not skip using computers all together, and hey lets not use internet, all that textual communication is way too ambiguous :smiley:

1 Like