Compare two polysurfaces

Hello all,

I was wondering if there any method to compare two polysurfaces (eventually meshes) in different orientations?

For example, if I have two polysurfaces, how can know if they are actually the same polysurface but with different orientation in space? (See the image)

If there is nothing ready, what would be the right way to approach the problem?

Thanks in advance!

Hi @Ayoub,

The Rhino SDK doesn’t have anything that will do this - sorry.

– Dale

Mitch wrote a script for me that does this see link to the thread below…

Thank You again Mitch…Hope other find it as useful as I do.
Brian

To solve this in a general way would be quite complex.

You would need to solve:

  • Is there a transformation matrix so that shape A is exactly shape B?

If the objects would be exactly the same (they would be copies, constructed in exactly the same way), the transformation matrix would be a lot easier, since you could take a plane from the first face, at the first edge and the first vertex you encounter and place it in the origin, and then compare everything in place.

If the objects would not be copies, but similar, it becomes a lot more tricky. (How to define similarity, and how similar is similar enough?)

If you can solve the transformation part, you can try to do a mesh collision, similar to what is commonly used in BIM software to check if the models are in the same place.

Easier to solve and might be part in solving the problem, but may also have false-positives and false-negatives.

  • Is shape A exactly shape B? (faces in the same order, all vertices at the same location, same area? Same amount of edges?)
  • Does each face in mesh A have the same face in mesh B? (try to find a matching face in B for each face A, and the other way around?)
  • Do shape A and shape B have the same volume?
  • Are the edge lengths in A and B the same?
  • Is the surface area of A and B the same?
  • Do it’s faces/edges/vertices have a similar distance to its mass center point?
  • Are its smallest boundingboxes the same size?
1 Like