MeshBooleanDifference bad result

In Rhino8 some of the “volcanos” are close after subracting some space from a cube.

actually in Rhino7.0 the result is worse. Just the box.

Hi @bar thanks for reporting.
Mesh booleans are completely rewritten for V8, and should perform much better. That being said: In general, Boolean Difference works better if the object you substract is not exactly the same size, but rather bigger. Because equal in general means unequal when it comes down to the fine digits. I’m not sure if that’s the case here too, so if possible, share a file that shows the problem, then I can share this with the dev.

By using this script:
import rhinoscriptsyntax as rs

obj2 = rs.ObjectsByName(“obj2”)
obj1 = rs.ObjectsByName(“obj1”)

rs.MeshBooleanDifference(obj1, obj2, delete_input=False)

using the attached file I get:
image (14.0 MB)

red are non-manifold edges and blue are naked edges. The input geometries are clean though.

I will forward this example to our dev.
In the meantime, if you need to get a result, I would try a voxel based approach like dendro:

I’ve added the sample to this YT:
RH-70149 MeshBooleanDifference failure example

RH-70149 is fixed in Rhino 8 Service Release 5 Release Candidate

this object was not part of the fix and is moved to a new YT:
RH-80420 Mesh Boolean difference fails

Using 8.5 I did Shrinkwarp, then found a few additional problems on the internal mesh had some issues:

Mesh has 3 naked edges. Naked edges can cause problems if the ultimate goal is STL output.
Mesh has 4 faces where the face normal differs substantially from the vertex normals.
These normals can cause problems if the ultimate goal is for rendering or boolean purposes.
Mesh has 6 faces with directions different from the mesh as a whole.
This can cause problems if you’re doing mesh boolean operations with it.

Mesh does not have any degenerate faces.
Mesh does not have any n-gons.
Mesh does not have any extremely short edges.
Mesh does not have any non manifold edges.
Mesh does not have any duplicate faces.
Mesh does not have any self intersecting faces.
Mesh has 2 disjoint pieces.
Mesh does not have any unused vertices.

The disjoint I think is the biggest problem. But easy to find with split disjoint. By repairing that internal mesh, the results for me look like this.

1 Like