AFAIK vtkCellPicker should be taking the mapper’s clipping planes into account. If you have a small reproduction example (e.g. on codesandbox or some other platform) that shows a bug, that will help us track it down.
thanks for the replies. I tried debugging it a bit.
in the method:
'publicAPI.intersectWithLine = function (p1, p2, tol, mapper) ’
I think that clipLineWithPlane is finding the clipplane, but then tMin is smaller later after at the intersectActorWithLine.
line 195 (tMin < model.globalTMin) = True so it skips to return tMin (line 219);
tMin is set from a vtkMapper on line 192 in CellPicker.js
I’m not super familiar with the clipping logic, so no idea if this is correct behaviour.
It seems that v22.0.0 doesn’t work for other parts (for instance vtkCellArray seems like it was changed).
Will be pretty hard to test that.
I think the problem is that t1 and t2 are not updated.
So once you go to intersectActorWithLine (line 200 in CellPicker) It’s still checking the range 0-1 instead of cliping.t1 - clipline.t2 .
intersectActorWithLine (line 247 in CellPicker) doesn’t seem to ever update t1 and t2 that it receives as arguments.
And then it just return the closest cell (the top of the building) because it checked the full range.