# Fix faces for unstructured grid

**URL:** https://discourse.paraview.org/t/fix-faces-for-unstructured-grid/7643
**Category:** ParaView Support
**Created:** [July 19, 2021, 2:48pm UTC](https://discourse.paraview.org/t/fix-faces-for-unstructured-grid/7643 "2021-07-19T14:48:25Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![MBG](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/m/7ab992/32.png) [@MBG](https://discourse.paraview.org/u/MBG)
#### Post date: [July 19, 2021, 2:48pm UTC](https://discourse.paraview.org/t/fix-faces-for-unstructured-grid/7643/1 "2021-07-19T14:48:25Z")

</div>

I’ve created VTK dataset but only grid edges are visible:  
[plot.vtk](https://discourse.paraview.org/uploads/short-url/mCSpfLSZyPU5vatsjKX87C9s3mY.vtk) (21.9 KB)

 ![image](https://discourse.paraview.org/uploads/default/original/2X/e/e34a5e2d5cb29eb2299c24f616322384f574cd43.jpeg)

With Delaunay filter it’s fixed:

 ![image](https://discourse.paraview.org/uploads/default/original/2X/7/7a50468ff0a181ac24c8917c121090349a45d4e1.png)

As I’ve checked in ASCII PLY output the original VTK has no faces (“element face 0”) while Delaunay processed VTK has them.

How could it be fixed in the input file without Delaunay filter?

---

<div class="post-metadata">

### Author: ![MBG](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/m/7ab992/32.png) [@MBG](https://discourse.paraview.org/u/MBG)
#### Post date: [July 19, 2021, 2:54pm UTC](https://discourse.paraview.org/t/fix-faces-for-unstructured-grid/7643/2 "2021-07-19T14:54:15Z")

</div>

Here is the VTK generation code:

```auto
...
         for (_xs,_ys,_zs) in zip(xs,ys,zs):
            # need to have 2 point or more
            #if len(_xs) <= 1:
            # continue
            vtk_cells.InsertNextCell(len(_xs))
            for (x,y,z) in zip(_xs,_ys,_zs):
                pointId = vtk_points.InsertNextPoint(x, y, z)
                vtk_cells.InsertCellPoint(pointId)
...

```
