vtkOBBTree.IntersectWithLine not finding intersection cell when it should
Related to #17440 (closed) and #10860 (closed)
Originated in https://github.com/pyvista/pyvista/issues/918
Here is an example mesh: mesh.stl
Using a known vector through the mesh, the vtkOBBTree.IntersectWithLine
does not find an intersection cell.
import vtk
... # load mesh from file
obbTree = vtk.vtkOBBTree()
obbTree.SetDataSet(mesh)
obbTree.BuildLocator()
start = [0,0,0]
stop = [54857, -1.78419e+06, -21443.4]
points = vtk.vtkPoints()
cell_ids = vtk.vtkIdList()
obbTree.IntersectWithLine(start, stop, points, cell_ids)
ncells = cell_ids.GetNumberOfIds()
>>> ncells
0
when the vector clearly goes through the mesh as shown by loading it in paraview and adding a line source with those same values: