Create 2D Hexagon

I’m new to using Paraview and VTK, so I might be completely off here - but is there any way to create a 2D hexagon in Paraview? Currently, I’m creating the vtu file using the following code:

This successfully creates the hexagon, and everything looks good when viewed from a Wireframe perspective:


However, when I look from the ‘Surface With Edges’ representation, there are extra edges through the middle of the hexagon:


I want to represent the hexagon in Paraview as a surface with edges, but only the edges on the outside of the hexagon. I assume this is an issue with my code, but I’m not sure how else to create the hexagon. Is there any way to do this? Thanks a lot

Looks like your points are not in the right order.

You can create a Sphere source with Theta Resolution and Phi Resolution both set to 4. Then, Slice it with the default settings. That produces a hexagon.