Meshing solids after Boolean Union

Hi everybody

When I merge two solids with a boolean union, planar faces are not merged completely, but they seems to conserve a sort of “memory” of the polysurfaces that generated them. This is not a big issue until I try to mesh them. When I do so, each “sub-face” is meshed independently and this can sometime lead to very bad triangles.

I try to explain this with an example.
Let’s create two boxes, a 1x1x1 one and a very narrow one on one of the faces:

Let’s merge them with boolean union. We can already see that the lines separating the two original solids did not disappear. Indeed, if we explode this solid we obtain 10 surfaces and not 6.

If we then mesh this solid, you can see that the original seam between the two solid is maintained, so the top surface of the solid cannot be represented by a single face (or two if I triangulate the mesh) but it is represented by 2 rectangular faces (or 4 triangular ones).

How can I “remesh” this solid (either before or after meshing it) so that the boundary between the two original boxed is “forgotten” and it’s considered a simple 6-faced solid with no internal boundary?

Use this
2022-08-25 12_45_53-Window right click option
(or MergeAllCoplanarFaces command)
on your solid before meshing.

1 Like

I can’t believe it.
I’ve been trying all possible commands in the Surface Tools and in the Mesh Tools tab, but I didn’t check the Solid Tools well enough…
The solution was right under my nose!

Thank you very much!

Hi Luca -
Just note that you can also run that command on meshes.

Hi Wim
Just FYI: I’m afraid I tried this on meshes but this didn’t work. Neither the “two” nor the “all” version.

Hi Luca -
The mesh faces need to be coplanar for this to work. Can you post a mesh where that is the case and the command doesn’t work?

I’m using the same example as before.
Neither using “Merge all coplanar faces”, nor doing “Merge two coplanar faces” and then selecting the two top faces, merges them.

This is easily checkable either using _PolygonCount or _ExtractMeshFaces

mesh_coplanar_faces.3dm (25.5 KB)

Thanks, Luca.
It appear that this currently stops at unwelded edges. You can run Weld on the mesh and then the command will work.

I’ve added RH-69972 MergeAllCoplanarFaces: Do not stop at unwelded edges