Boolean Intersection fails for identical objects

I found this in Grasshopper, when the parameter driven heights of two cylinders happened to be equal and the boolean intersection failed. I then checked in Rhino and see the same failure.

If two objects are identical and are placed and oriented so their surfaces occupy exactly the same space then the boolean intersection should be the complete item.

I see this bug in R7, R8 and the Beta.

Steps to reproduce:

  1. Create a cylinder (or any closed object).
  2. Copy in place.
  3. Run Boolean Intersection on the two objects.

Regards
Jeremy

p.s. Don’t forget that for objects with symmetry, a difference in orientation need not negate the intersection.

my understanding for boolean operations implementation / algorithm:

to work properly _intersect should find closed curves that define the sections / parts of the input object that need to be split and recombined.

the way this recombination occurs is defined by the normals of each input object - that s why boolean operations are most reliable for closed (poly)surfaces.

Everything that can be done with boolean Union can also be done with trim + join.

Even if _booleanIntersect on a mathematical / geometrical point of view should serve as a workaround for “are object identical” - my guess the algorithm stops if there is no proper intersection curve - which is the case for identical objects.

it should be easy to check if 2 cylinders are identical within a tolerance.
Edit: there is TryGetCylinder in Rhinocommon

my 2 cents

kind regards - tom

Hi Tom,

I don’t know about the general case, but if you run _Intersect on the two cylinders you will see that you do actually get valid intersections.

I’m not trying to determine whether two cylinders are identical, I’m using one cylinder to - effectively - trim another and there is a fairly common case where the two are identical. I was caught out in Grasshopper because the failure cut short the much larger process. It’s easy enough to work around once you know the problem exists.

It is not just identical objects where boolean intersection fails. One object lying completely in the interior of another should produce a boolean intersection identical to the inner object, but Rhino rejects this idea with the erroneous message “Objects do not have a common intersection. Nothing done.” The developer’s mindset was obviously firmly rooted in surface intersections, not volumetric ones. One might justify this with the cry “But Rhino is a surface modeller” - except that the boolean operations are on a menu labelled “Solid”.

An area of Rhino that could do with some TLC.

Regards
Jeremy