I’ve investigated this, and the situation is more complex than I had expected. Key points:
- The behavior of vtkClipPolyData has not changed since VTK 8.2
- The behavior of GetBounds() has changed (it changed in VTK 9.1)
- Use GenerateClippedOutputOff() to avoid the extra, unwanted points
Even in VTK 8.2, vtkClipPolyData will produce these unwanted points if GenerateClippedOutput is On. It does this because it uses the same vtkPoints object for both the ClippedOutput, and the main Output. In other words, both outputs contain all of the points for both the “clipped” and the “kept” parts of the dataset.
The thing that changed in VTK 9.1 is that vtkPolyData::GetBounds() computes the bounds based on the points rather than the cells. So GetBounds() used to ignore any points that didn’t belong a cell, but now, GetBounds() uses all the points, even points that aren’t used by any cells. See this link for an explanation.
Proposed solution:
Instead of using GenerateClippedOutputOn(), use two separate vtkClipPolyData filters and call InsideOutOn() on one of them. This will be less efficient than using just one vtkClipPolyData, but it will probably be more efficient than vtkCleanPolyData.