I’ve been battling for weeks with a MeshBooleanDifference challenge. I am subtracting out building shapes from a topographic mesh. Some shapes work, some don’t.
After many weeks of debugging and testing I have reduced the problem - I think - to something about extrusions from curves (lightweight Extrusion objects) vs extrusions from surfaces (Polysurfaces). In short, Extrusions work but some polysurfaces don’t (although some do).
Grasshopper extrusions always result in Polysurfaces, even from curves, and most of them don’t boolean with meshes properly (although some do). But even without GH, you can replicate the same failures.
For simplicity, I picked a few examples and deleted everything else from the model, which is attached. The topo mesh has been replaced with a simple mesh box. The original curves and surfaces are on hidden layers.
My GH patch uses the Boundary command (aka PlanarSrf) to combine curves that have internal spaces (i.e. courtyards), and then Extrudes. An example GH patch is attached, but you don’t need it to see the issue.
The orange and red shapes were all extruded by GH, in an identical manner. The ones that fail for MeshBooleanDifference I colored red. I can see no pattern for which fail. You can see one of them has a courtyard, to illustrate the necessity of the boundary command.
I have also included on hidden layers re-extrusions from original curves - which work! - and re-extrusions from surfaces - which don’t.
Interestingly even a curve re-extrusion that works, after being converted to a polysurface (ConvertExtrusion), then doesn’t work! You can see for yourself on the “then converted to polysrf” layer.
Also of note - a non-mesh BooleanDifference with a simple box does work, in all cases. But this doesn’t help me. Converting the mesh to NURB does not work, btw.
Any ideas?
Thank you so much for taking a look!
- Eric
boolean troubleshooting.3dm (4.6 MB)
boolean troubleshooting.gh (7.4 KB)