Difference between MeshBooleanDifference and BooleanDifference+Meshing [both in GUI/PythonScript]

Hi everybody,

Can someone tell me the difference between using MeshBooleanDifference and using BooleanDifference and then meshing the result ?

When I’m doing MeshBooleanDifference it works perfectly fine while I had BooleanDifference problems using the second method (BooleanDifference failed and I had to perform lateral slight translations) … What is Rhino really doing with MeshBooleanDifference ?

Also, my goal would be to use MeshBooleanDifference in a Python script, but it seems that rs.MeshBooleanDifference(input0, input1) needs input0 and input1 to be meshes (http://developer.rhino3d.com/api/RhinoScriptSyntax/win/#mesh) while in the GUI it seems to accept meshes, surfaces and polysurfaces. Any trick ?

Thank you in advance, and happy New Year !
Nathan

The algorithms to Boolean Brep objects is completely different than the algorithm to Boolean mesh objects.

If you are having a Boolean problem, whether it be Breps or meshes, please post your problematic geometry.

– Dale

Hi Dale,

Concerning my boolean problem, I was referring to the problem I explained in this topic:
Different behaviour of boolean difference between GUI and PythonScript

The geometry is not actually the problem, but I hope it can help you understand my problem. Right now the facts are the following:

  • when I perform BooleanDifference (on polysurfaces) I got a fail --> I assume it is linked to the Known Limitations section of https://wiki.mcneel.com/rhino/booleanfaq --> FACT : I have to perform slight displacements as advised (for a very precise value that I still don’t know where it comes from, but that’s a different story). Then I simply mesh the boolean result

  • when I perform MeshBooleanDifference in GUI (on polysurfaces) it works perfectly fine without the need of slight displacements (and it meshes according to the DocumentProperties > Mesh parameters) (I also assume that when I use MeshBooleanDifference on polysurfaces, Rhino pre-mesh the polysurfaces then perform the MeshBooleanDifference that we have on PythonScript)

  • when I perform MeshBooleanDifference in PythonScript (on meshes created from polysurfaces) it works perfectly fine without the need of slight displacements

So my questions are:

  • why is the BooleanDifference on polysurfaces way more constraining than the MeshBooleanDifference ?

  • Am i loosing information on my meshed geometry if I use MeshBooleanDifference (basically Mesh then boolean) instead of BooleanDifference then Mesh ?

I hope to be clear enough :slight_smile:

Nathan

To begin the understand this, it helps to understand what surfaces, polysurfaces and meshs are. The links I’ve provided should help with this.

Absolutely, as a mesh is just a faceted approximation of a surface or polysurface.

– Dale

Thank you I will read them carefully.

I mean, I know that I will lose information between my polysurface and my mesh, but is there a difference between mesh1 and mesh2 if:

  • mesh1 = MeshBooleanDifference (Mesh then boolean)
  • mesh2 = BooleanDifference + Mesh

(of course using the same meshing settings) ?

Thank you in advance,
Nathan

There will be differences between the two outputs. But, since your end result is a mesh, the differences may be inconsequential. You will need to determine that, based on where the mesh is going.