# Writing vtk file for generating unstructured grid.

**URL:** https://discourse.paraview.org/t/writing-vtk-file-for-generating-unstructured-grid/4909
**Category:** ParaView Support
**Tags:** vtk
**Created:** [July 21, 2020, 8:33am UTC](https://discourse.paraview.org/t/writing-vtk-file-for-generating-unstructured-grid/4909 "2020-07-21T08:33:48Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![shriramk9695](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/e56c9b/32.png) [@shriramk9695](https://discourse.paraview.org/u/shriramk9695)
#### Post date: [July 21, 2020, 8:33am UTC](https://discourse.paraview.org/t/writing-vtk-file-for-generating-unstructured-grid/4909/1 "2020-07-21T08:33:48Z")

</div>

Hello,

I’m fairly new to Paraview and I’m trying to write a vtk file to visualize a grid using the unstructured grid option. Having manually inspected the data the points and connectivity seem to be right but the resulting grid looks weird. I have attached the vtk[Grid.vtk](https://discourse.paraview.org/uploads/short-url/r0y9jWEGZnlHpfSU2pczx081k3Q.vtk) (322 Bytes) . Am I missing something here? Any inputs would help. Thank you.

Regards

Shriram

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [July 21, 2020, 8:58am UTC](https://discourse.paraview.org/t/writing-vtk-file-for-generating-unstructured-grid/4909/2 "2020-07-21T08:58:52Z")

</div>

Looks like your cells are twisted.

---

<div class="post-metadata">

### Author: ![shriramk9695](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/e56c9b/32.png) [@shriramk9695](https://discourse.paraview.org/u/shriramk9695)
#### Post date: [July 21, 2020, 2:15pm UTC](https://discourse.paraview.org/t/writing-vtk-file-for-generating-unstructured-grid/4909/3 "2020-07-21T14:15:20Z")

</div>

Hello Mathieu,

Thank you. I just figured it out. The order in which the cell vertices were taken was not correct. Didn’t think it mattered. Thanks again.
