Coplanar Polygon Outline Geometry?

Hello to all! And happy next holidays!
It happens that I re-read the documentation in search of things that can help me, and today I saw this:

I tried to apply it to a regular polygon, I tried to create it as described and add it to the scene as a primitive.
however, I have not been able to get this to work. Any ideas?
I myself recently ran into the need to stroke the drawn polygon and solved it - through the 2nd layer of triangular primitives that I created before, and added a stroke to them.
So it might be an interesting option in the future if we can understand how it works.

Hi @dihand,

Thank you for reaching out to the community with your question. Can you please share what you have so far in a sandcastle demo? It would also be helpful if you could provide some more information on your use case.