BooleanUnion of touching but non-intersecting solids

I try to programmatically unionize solids with RhinoCommon.

For this I use an iterative process:
I take two solids from the list and calculate the BooleanUnion.
If successful (valid and closed) the result is added to the list and the input solids are removed.

This does not work sometimes for non-intersecting but touching solids.

Here an example of such a building: BooleanUnion_touching_non_intersecting2.3dm (3.1 MB)

Does anyone have an idea how to unify these solids programmatically?

Thanks for your support!

Hi @thomas.k,

I’ll first point you to this article: https://wiki.mcneel.com/rhino/booleanfaq

Tolerance is a big deal when joining surfaces and performing Boolean operations. The model units seem reasonable. Are you using an alternative tolerance when building your solids or performing the union?

But, no, there is no silver bullet for this - sorry.

– Dale

Hi @dale

Thanks for the information.

I have currently implemented the following approaches

  • Iteratively always two solids (each with each). If successful add the result to the list and remove the two input breaks from the list

  • Brep.CreateBooleanUnion all together with the tolerance defined in the document (1 cm)

  • Brep.CreateBooleanUnion all together with an increased tolerance (2.828 cm) / decreased tolerance (0.282 cm)

  • Enlarge the smallest solid (scale by 5 cm in the BoundingBox diagonals), so that it cuts the other solids

Do you have another idea how to solve such situations?

Many thanks
Thom

1 Like

Hi @thomas.k,

I’ve taken another look at this model and, honestly, it’s a bit of a mess. It’s probably more efficient to take some time and clean it up manually just using Rhino.

– Dale

Hi @dale

The “Building Solid” layer contains 11 closed solid polysurfaces.

I do not understand what is meant by a bit of a mess.

Do you mean the (random) division of the 11 solids? This is due to the iterative approach, which simply unifies the parts that produce a valid result.

When I try to make a BooleanUnion in Rhino, it fails too (Boolean union failed.)
I have tried different Model Absolute Tolerance settings in the Document Properties. Without success.

Therefore it would help me if you could briefly explain what I should clean up.

Best regards

Hi @thomas.k,

I’m referring to stuff like this:

– Dale