Distinguish two almost-identical objects

There are three very simple objects in the attached file, two of which are copies and one of which is a mirror image of each other. Assuming there could be translations/rotations (i.e. the objects could be anywhere and in any orientation), how would one be able to distinguish that the mirror object (red) is NOT geometrically identical to the others? It has:

  • same overall area, volume
  • same individual face areas
  • same number, individual and total length of edges
  • various distances of corner points, edge midpoints etc. to object area/volume centroid will be same

Just curious if anyone has any brilliant ideas, I’m fresh out… Nothing mission critical, however…


MirrorSkewBox.3dm (103.5 KB)

Hi Helvetosaur, this is one way you could go, but it assumes that you find four corresponding points in the original and mirrored objects, wich I guess may not be easy.In the image they are A,B,C,O and A1,B1,C1,O1.

The cross product of OA and OB will be a vector that points in a direction relative to the object that is opposite to the cross product of O1A1 and O1B1 (blue arrows). If you draw a line that starts from O or O1 and goes in the cross product vector direction of the same amount of units in both cases, you will have an end point that has a different distance from other points of the object. So the distance from the line end to C will be different from the distance from the line end to C1 (blue lines), and you will know your objects are not the same.

Hope this helps!

Thanks, unfortunately, there is no real easy way to find said correspondence… :frowning:


Hi Helvetosaur. I’m curious whether you made any headway on this issue in the intervening years? This particular issue has been causing some problems at my job lately, so I’ve been trying a few different approaches.

I’ve had mixed success on this issue by comparing the distance between each Brep’s unrolled vertices to their average point - Mirrored objects unroll differently than the originals. Unfortunately, I’m also seeing false positives when congruent Breps are constructed differently (e.g. an extrusion vs a polysurface).

Anyway, the attached script successfully differentiates your MirrorSkewBox.3dm example.
DifferentiateBrepByUnrolledVertices.gh (21.9 KB)

No, TBH I haven’t really worked on this for a long time…