getCell not working ?

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

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 :slight_smile:

Thanks,
Julien.

Ok thank you for your quick answer.

I’ll see what I can do.