vtkFrustumSelector and poly-lines

I’ve identified an unexpected behavior in frustum-selection, and wanted to ask whether others think it’s a bug or a feature.

We’re using a small 9x9 pixel frustum around the mouse click to select all poly-lines near the mouse. I’ve found that if a poly-line encloses the frustum but doesn’t intersect it, the poly-line is still identified as selected. Specifically, vtkSelectionSource in FRUSTUM mode will use vtkFrustumSelector, and that class extracts a list of edges from the polyline, but then calls ComputeCellsInFrustumFunctor::FrustumClipPolygon just like it would if the edges came from a polygon instead of a poly-line.

If we make sure the line is inside the frustum to mark it selected, it will change the behavior of frustum selection with poly-lines, but can anyone see a drawback to that?

Seems like a bug. I remember (dimly) that the base algorithm correctly treats polygons that cover but does not intersect the frustum as inside. I also remember that for some of VTK’s odder cell types needed special handling. This seems like a case that we neglected to consider and add special case handling.

Think of the letter “O” with the selection inside - if you want to hit the O use use polygons.
Think of the letter “C” with the selection inside - if you want to miss the C you should be able to use polylines.

A fix is submitted https://gitlab.kitware.com/vtk/vtk/-/merge_requests/7746