# getCell not working ?

**URL:** https://discourse.vtk.org/t/getcell-not-working/6857
**Category:** Web
**Created:** [October 13, 2021, 2:29pm UTC](https://discourse.vtk.org/t/getcell-not-working/6857 "2021-10-13T14:29:46Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![raphael-bresson](https://discourse.vtk.org/user_avatar/discourse.vtk.org/raphael-bresson/32/3996_2.png) [@raphael-bresson](https://discourse.vtk.org/u/raphael-bresson)
#### Post date: [October 13, 2021, 2:29pm UTC](https://discourse.vtk.org/t/getcell-not-working/6857/1 "2021-10-13T14:29:46Z")

</div>

Hi,

I’m running vtk.js 20.0.  
I have a polydata _p_. I first build the cells: _p.buildCells()_  
Then I try to get a Cell: _p.getCell(0)_  
And I get the error: _CELL\_FACTORY[cellInfo.cellType] is undefined_  
My cell Type is VTK\_QUAD  
When looking at PolyData.js I notice that this cell type and most cell types do not appear in CELL\_FACTORY:

> var CELL\_FACTORY = (\_CELL\_FACTORY = {}, \_defineProperty(\_CELL\_FACTORY, CellType.VTK\_LINE, vtkLine), \_defineProperty(\_CELL\_FACTORY, CellType.VTK\_POLY\_LINE, vtkLine), \_defineProperty(\_CELL\_FACTORY, CellType.VTK\_TRIANGLE, vtkTriangle), \_CELL\_FACTORY); // ----------------------------------------------------------------------------

So am I missing something or is it that vtk.js only supports lines and triangles so far when using getCell ?

Thank you

---

<div class="post-metadata">

### Author: ![finetjul](https://discourse.vtk.org/user_avatar/discourse.vtk.org/finetjul/32/154_2.png) [@finetjul](https://discourse.vtk.org/u/finetjul)
#### Post date: [October 13, 2021, 2:51pm UTC](https://discourse.vtk.org/t/getcell-not-working/6857/2 "2021-10-13T14:51:53Z")

</div>

Indeed, Quad cells are not yet supported. It shouldn’t be too hard to add though. Feel free to look at what has been done for triangles and at how it is done in C++.

Contributions are always welcome 🙂

Thanks,  
Julien.

---

<div class="post-metadata">

### Author: ![raphael-bresson](https://discourse.vtk.org/user_avatar/discourse.vtk.org/raphael-bresson/32/3996_2.png) [@raphael-bresson](https://discourse.vtk.org/u/raphael-bresson)
#### Post date: [October 13, 2021, 2:53pm UTC](https://discourse.vtk.org/t/getcell-not-working/6857/3 "2021-10-13T14:53:55Z")

</div>

Ok thank you for your quick answer.

I’ll see what I can do.
