Can two figures have the same area, perimeter, and same number of segments have different shape? I want to make an algorithm grouping all the details having the same shape.
each detail is defined by its surface, and a list of contour lines.

First I believed that having the same perimeter length and same surface would be enough, but I saw on that link that it is wrong hypothesis.

If I take as additional condition that the two shapes have the same number of segments, would it be enough? Or else how can I check that?

The problem is for each detail, they can get rotation, or symmetry.

Edit :

Thanks for your answers, I finally found a way to solve the problem (answer below)
In the spirit of the no-words answer to the linked question:
A famous problem was posed in 1966, "Can you hear the shape of a drum?" That is, can you find two different planar domains whose spectrum is the same? It was known that any two such domains must have the same area and the same perimeter. The question was answered negatively by Gordon, Webb and Wolpert in the early 1990s. Here is their example:



Notice that the number of sides is also the same, so this answer's the OP's question with even more conditions imposed.