From what I understand from the docs, in VTK 9.4 you, first, use GetLinks()‘s returned vtkAbstractCellLinks’ (do not downcast) GetType() method to query its concrete data type (the six constants below are defined in vtkAbstractCellLinks::CellLinksTypes enum VTK: vtkAbstractCellLinks Class Reference):
That’s right. Previously in 8.2, I can directly use GetCellLinks() and get the Link internal type inside it, then query the cell size and the cell list.
Now after the upgrade, I need check which type of the link it is. And now I have used the type condition check to get the correct value.
I just wonder why in previous 8.2, I get the links data with the type of CellLinks, while on the contrary the links changed to be the type of Static Cell Links in 9.4 version. I have not delved into the code changes in 9.4. The value of Links type is changed, is that caused by the design change of data storage? Maybe I need to debug into the implementation of new vtk codes.
This class is a faster implementation of vtkCellLinks. However, it cannot be incrementally constructed; it is meant to be constructed once (statically) and must be rebuilt if the cells change.
This is a templated implementation for vtkStaticCellLinks. The reason for the templating is to gain performance and reduce memory by using smaller integral types to represent ids. For example, if the maximum id can be represented by an int (as compared to a vtkIdType), it is possible to reduce memory requirements by half and increase performance. This templated class can be used directly; alternatively the non-templated class vtkStaticCellLinks can be used for convenience; although it uses vtkIdType and so will lose some speed and memory advantages.