How to delete a cell from vtk unstructuredGrid

Hello,

I have a vtkUnstructuredGrid, and what I’d like to do is delete some old cells and then add some new cells to it. But I haven’t found any way to do that.

  1. My current plan is to use vtkPolydata instead of vtkUnstructuredGrid because I know how to delete cells from vtkPolyData(https://examples.vtk.org/site/Cxx/PolyData/DeleteCells/#:~:text=This%20example%20demonstrates%20how%20to,suitable%20for%20efficient%20delete%20operations.)

  2. My second thought is to do this operation on vtkCellArray, but I found no way.

Thank you!

Perhaps relevant are this link and this link. I never found an elegant way … and I’d like to see if there is one.

1 Like

Thank you! I will try those out too