# order of returned points for a cell

**URL:** https://discourse.vtk.org/t/order-of-returned-points-for-a-cell/10650
**Category:** Support
**Created:** [February 9, 2023, 3:04pm UTC](https://discourse.vtk.org/t/order-of-returned-points-for-a-cell/10650 "2023-02-09T15:04:04Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![sarmad](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/s/34f0e0/32.png) [@sarmad](https://discourse.vtk.org/u/sarmad)
#### Post date: [February 9, 2023, 3:04pm UTC](https://discourse.vtk.org/t/order-of-returned-points-for-a-cell/10650/1 "2023-02-09T15:04:05Z")

</div>

I am reading open foam data and for a specific type of cells for example QUAD, i store the point ids in an array. To get the point ids i use `vtkIdList *pointIds = currentCell->GetPointIds()`.  
My question here is, what does vtk say about the order of these returned points? How do i know if the points are in the order that they should be?

---

<div class="post-metadata">

### Author: ![Yohann\_Bearzi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/yohann_bearzi/32/671_2.png) [@Yohann\_Bearzi](https://discourse.vtk.org/u/Yohann_Bearzi)
#### Post date: [February 9, 2023, 3:18pm UTC](https://discourse.vtk.org/t/order-of-returned-points-for-a-cell/10650/2 "2023-02-09T15:18:32Z")

</div>

The points are returned in the order they were put. You can assume their ordering by looking at the normal orientation of your quads. Setting yourself in the plane spanned by the quad, if the normal points toward you, then the points are ordered counter-clockwise.

---

<div class="post-metadata">

### Author: ![sarmad](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/s/34f0e0/32.png) [@sarmad](https://discourse.vtk.org/u/sarmad)
#### Post date: [February 9, 2023, 3:45pm UTC](https://discourse.vtk.org/t/order-of-returned-points-for-a-cell/10650/3 "2023-02-09T15:45:37Z")

</div>

okay thank you
