I’m looking for a way to select 1D, 2D and 3D (polydata and unstructured grid) geometry (shape) that is either entirely or partly covered by a 2D selection polygon (loop) drawn on the screen.
All of the following cases should select the shape:
- shape entirely inside loop
- loop crosses shape edges including edge end-points
- loop crosses shape edges, not including edge end-points
- loop entirely inside shape
I am currently using vtkImplicitSelectionLoop which boundary cells extraction enabled, but this works only for cases 1 and 2.
In ParaView, there is the ‘Select Cells With Polygon’ tool but it only selects cells on the surface and ‘Select Cells Through’ which only works with a selection rectangle.
An alternative solution would be to project all edges along the camera orientation on the 2D plane of the loop and see which edges cross the loop edges, but fails on case 4.
Is there any support for this latter approach? Or am I overlooking other options?
Thanks a lot for any help on this!