I have a couple of intersecting meshes, which appear to be “good” as far as Panels >> Mesh Repair is concerned, but where Mesh Union and Mesh Difference laugh at me and do nothing!
What are the requirements on meshes that meshes must follow in order for them to Union correctly? I’m not wanting a fix for this particular case; I just want to understand it!
Be it curve booleans, solid (surface/polysurfaces/breps) booleans or mesh booleans, the “rules” are always the same:
Avoid co-planar faces.
You want the 2 solids to not share vertexes, edges or faces.
Make intersections that completely intersect.
Rhino needs to easily detect “in” and “out”.
Here an example with 2D curves:
good intersection
bad/risky intersection
In this second case, the small rectangle was slightly rotated, resulting in a dirty cut.
Tolerances will make you meet such situations.
In your case with meshes, the 2 meshes share most of their vertexes and faces, perfectly aligned.
Rhino fails to detect “in” and “out” , giving you an “incorrect” result.
In this particular case, none my attempts to move one of the meshes by a small amount in any axis, nor to scale to something just under 100% worked, since the two meshes are essentially the same, except for the caps. One gets anomalies in all cases.
This actually all came about because I tried to use Mesh Tools+ Mesh Caps tool, which comes with a cute ‘Distance’ option, which also fails to understand the difference between ‘in’ and ‘out’, giving a cap that went in for one end and out for the other. Trying both at once and then unioning was a complete failure! Sigh!
There is a plugin Carverino which I have found useful when the native GH mesh booleans didn’t work. The site says Rhino 4 and 5 but it does work for 6.