grid is one vtkUnstructuredGrid,when use surfaceFilter to filter the surface,
after do that,for different grid,some globalIds is nullptr, and sometime globalIds is not nullptr; why?
(vtk Version is 9.2)
//grid : vtkUnstructuredGrid
auto surfaceFilter = vtkSmartPointer<vtkDataSetSurfaceFilter>::New();
auto mapper = vtkSmartPointer<vtkDataSetMapper>::New();
when use surfaceFilter to filter the surface,
after do that,
sometime globalIds is nullptr, and sometime globalIds is not nullptr
auto globalIds = mapper->GetInput()->GetPointData()->GetGlobalIds();
I try to use these setting ,but still dont work
I have just stumbled upon this behavior as well.
For me, the
globalIds are set if the grid contains only linear elements, and unset if it contains quadratic elements (even when
SetNonlinearSubdivisionLevel (0) is used).
Looking into the code a bit, it appears a
vtkUnstructuredGridGeometryFilter is added in this case, here.
To test this, I have added
vtkUnstructuredGridGeometryFilter code after this line, and the global IDs are then set.
However, I’m not sure if copying the global IDs in this way actually makes sense in the context of the
vtkUnstructuredGridGeometryFilter. Maybe someone with a better understanding of the ID handling can comment on this.
I also noticed that without changes, we can still get the
vtkOriginalPointIds . Are these the same as the global IDs? If not, how are they different?
 These are controlled by the
SetPassThrough<..>Ids calls I believe
Adding to this, in our case the behavior changed when upgrading from an older VTK version (7.1.1). I believe the change is due to commit
In https://gitlab.kitware.com/vtk/vtk/-/commit/320464e6a249b598f5d98f7839cfcb2d477d4ba9?page=2#6ba64f37e49ed3a9d62d009d4efd872e27e46ea3_1477_1495, the
handleSubdivision flag can now become
true even when
NonlinearSubdivisionLevel is zero.