Find surfaces with the same shape

Hi all,
I am trying to create some polyominoes, starting from a grid of cells. I am having some issues because I would like to avoid creating duplicates, both in terms of rotation and flip. So, I am trying a way in which I can check if two surfaces have the same shape, but I am not able to find a solution to this.
I am now trying to do this using four cells, so the number of possible combination is five. I would like to find resulting surfaces which have the same shape regardless rotation or flip like these here:
image
So far, I am just deleting surfaces which have the same centroid after moving all of them in the same point, but it doesn’t work for all of them. As you can see, the two L shaped surfaces above have the same shape but different centroids. These surfaces have the same area, so I can’t use it. I also tried with the perimeter, but different shapes have the same perimeter here.
It isn’t a problem to create the polyominoes, but I want them to be different in shape.
Thanks

It seems that the perimeter converted to nurbs does the job.
Find surfaces with the same shape.gh (18.3 KB)

EDIT: I just saw that the L shape is repeated as a mirror, well, it was an attempt. I leave the file so that the generator and the column display can be reused.

3 Likes

Thanks @Dani_Abalde ! That is a very good solution and it perfectly worked for me!
I was able to implement it in my code by using ghpythonlib.components.
I would also like to implement it with rhinocommon if possible. However, I didn’t find a suitable solution to replace the Discontinuity component in rhinocommon.
Anyway, for now it works even in this way.
Thank you very much for your help :grinning: