# vtkCellArray updates

**URL:** https://discourse.vtk.org/t/vtkcellarray-updates/3007
**Category:** Support
**Created:** [April 9, 2020, 9:03pm UTC](https://discourse.vtk.org/t/vtkcellarray-updates/3007 "2020-04-09T21:03:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![kayarre](https://discourse.vtk.org/user_avatar/discourse.vtk.org/kayarre/32/808_2.png) [@kayarre](https://discourse.vtk.org/u/kayarre)
#### Post date: [April 9, 2020, 9:03pm UTC](https://discourse.vtk.org/t/vtkcellarray-updates/3007/1 "2020-04-09T21:03:08Z")

</div>

based on changes from: [Upcoming changes to vtkCellArray](https://discourse.vtk.org/t/upcoming-changes-to-vtkcellarray/2066)

I have some code I am trying to update to the latest VTK,  
and I think I am running in an issue with this new implementation.

vtkPolyData is subclassed and has this code to get a face vertices from face id

```auto
inline void GetFaceVertices(const vtkIdType& face, vtkIdType &nVerts, vtkIdType &Vertices) {
    this->Cells->GetCell(this->Cells->GetCellLocation(face), nVerts, verts);
}

```

I think Maybe It should use `this->GetCellPoints(face, verts)`

Would that be the correct implementation?

another Example that I am having a hard time following is:

```auto
face=this->Polys->InsertNextCell(NumberOfVertices);
for (i=0;i<NumberOfVertices;i++)
	this->Polys->InsertCellPoint(Vertices[i]);
vtkIdType Loc=this->Polys->GetInsertLocation(NumberOfVertices);

this->Cells->InsertNextCell(Type,Loc);
while (face>=this->NumberOfAllocatedPolygonsAttributes)
	this->AllocateMorePolygonsAttributes();

```

where **this-\>Cells-\>InsertNextCell(Type,Loc);** fails because the method doesn’t exist.

I think `Loc` can be replaced by a value of type VTKCellType but I am not sure if thats correct.
