# PolygonCoordinates extract the submits in the “wrong” order

I don't understand why, in the example below, PolygonCoordinates seems unable to correctly extract the summits of a rectangle in the "right" order so we can reconstruct the same shape:

Rectangle[{-1,-1},{1,0}]
PolygonCoordinates[%]
Polygon[%]


Producing:

Rectangle[{-1,-1},{1,0}]
{{-1,-1},{-1,0},{1,-1},{1,0}}


Obviously, the resulting polygon is not a rectangle. Why? How to fix that?

FWIW, there is an old, unanswered, and very similar question here:
Order of PolygonCoordinates[] is undefined in Mathematica 12?

• Rectangle[{-1, -1}, {1, 0}] // CanonicalizePolygon // Normal // First gives the coordinates in the right order. It works in this case too. The use of First can be found in the documentation of PolygonCoordinates chapter "properties & Relation", though I'm not conviced that it is reliable. – andre314 Feb 24 at 19:34
• Thanks for the comment André. I've done some tests this afternoon. Apparently CanonicalizePolygon reliably produces a polygon whose submits are in the original shape order. There are even an example in the doc about converting a Rectangle to a Polygon. It's PolygonCoordinates that ignore the original vertice order. – Sylvain Leroux Feb 24 at 21:55