vtkExtractCellsByType on unstructured grids with one cell type is missing points
Applying the vtkExtractCellsByType
filter on an unstructured grid containing a unique type of cell does not contain points.
Python script to reproduce:
import vtk
# Create unstructured grid with one type of cell
cellSource = vtk.vtkCellTypeSource()
cellSource.SetCellType(vtk.VTK_TETRA)
cellSource.Update()
# Extract tetrahedra
extr = vtk.vtkExtractCellsByType()
extr.SetInputConnection(cellSource.GetOutputPort())
extr.AddCellType(vtk.VTK_TETRA)
extr.Update()
# Points are missing
if extr.GetOutput().GetNumberOfPoints() == 0:
print("Points are missing.")