Boolean Union Problem

Dear experts,

Boolean operations in Grasshopper usually lead to “random problems” like the following. Sometimes you can find some workaround by dividing the boolean union into pieces and then joining all together, but this time I failed… Please, would you help me?

I have some larger sketch that generates different geometries for 6-arm Breps. To illustrate this weird behavior I´ve prepared a minimal internalized version (12.6 KB). However, whereas it works nice for most geometries, for example (select “Good” in “Select lines” selector):

in some other, it totally fails (select “Bad” in “Select lines” selector):

Thanks a lot in advance!

I’ve played around with tolerance a bit and the bad curves result in closed breps if the tolerance is doubled if the initial pipes aren’t capped. (24.5 KB)

Hi Martin, thanks for your quick response!

Unfortunately, your solution seems quite unstable, at least in my computer. For example, using the 0.002 tolerance you´ve employed, yields one Closed Brep and one Open Brep (instead of the two Closed Breps you´ve obtained in your system with exactly the same input).

Furthermore, if I slightly change the tolerance to, for example, 0.00195, it produces one .

I´m sorry, but I need a more stable solution. I can´t figure it out why such a nice software as Rhino/GH has this kind of bugs…

Any other ideas?

PS: Thanks for the Python code to make solid unions!

Have you thought of using Multipipe?

1 Like

Hi Martin,

I didn´t know MultiPipe component, it is very fast and robust! Thank you very much!
It works nice for the Bad Lines, look:

However, I need that the surface fits the cylinders shape as much as possible, like this:

Is is possible to tightly fit the cylinders shape using MultiPipe? I´ve been playing around with its control parameters but I can´t find the way… Would you help me? (18.6 KB)

The crossings look better if you divide the lines.

1 Like


Not sure this will be robust in any way, but at least I gave it a try…
The main idea is to reorder the tubes and process to boolean operations in groups where I think success is more likely to happen.
Both examples work (with bad/good input), with tolerances set as default (0.001 in distance, and 1.0 in angle). Could be interesting to check for more cases, although the outcome is still likely to be bad.

I experienced such a problem in the past and the solution was to slightly move the pieces : the union actually worked if the lines were not perfectly joining in a center point. But I tried that here, with no luck. I get the feeling the problem comes from the two vertical tubes since they are almost aligned, but this is purely hypothetical.

The MultiPipe gives slightly closer results if you divide your curve in three and build a polyline. (21.0 KB)

1 Like

The two tubes which are colinear could be combined into one line or poly line first.

1 Like

Does this help?
Added FlattenTree before BrepUnion. Maybe I misunderstood.
But it worked for me.