Cell ID does not match original data.

I work with MATLAB and have some unstructured grid. I save the data using vtk DataFile Version 2.0.

When I open the data in paraview 5.5.2, while I can perfectly see and investigate the data, if I select an specific cell to view its ID, this ID does not match the MATLAB ID. The same happens with the vertices, their IDs do not match the MATLAB (and vtk file) IDs.

I believe this may be because I have it in surface mode, instead of volume mode. I can see how in Volume mode, the IDs of the vertices match, but I can not see the inside of the volume.

Does paraview change the IDs? How can I make paraview maintain the same ID order as in the vtk file, and at the same time inspect inside via cut?

ParaView should have the same ID as the ID in the VTK file. The IDs will be different if you use the Clip or Slice filters.

How far off are the IDs? Off by one? Random? Feel free to post a smallish VTK file here so we can investigate.

Hi Cory,

Yes, I am indeed using the Clip/Slice filters, as there are some things from my code that I am not sure about, and I’d like to know via paraview the IDs of the elements I need to further investigate in my MATLAB code.

For that, I Clip the model, find the element, and then what I’d like to do is know the ID of a manually selected cell, so I can go and debug the code. As you mentioned, when I do this with Clip the IDs are not the same, but completely random.

Is it possible to Clip a model and manually select a cell, to obtain its ID?

Before applying the Clip/Slice filters, apply the Generate Ids filter and change the Array Name property if you don’t care for the default name “Id”. Then apply Clip/Slice. When you interrogate the cells with, say “Hover Cells On”, you can see the original cell ID.