diff --git a/Common/DataModel/vtkCellLocator.cxx b/Common/DataModel/vtkCellLocator.cxx index a6a774c875b9366ae8ea68bbb369dbe0a9063ac7..0389c9d612b8f55ff21cb1a78e08624160d6edf5 100644 --- a/Common/DataModel/vtkCellLocator.cxx +++ b/Common/DataModel/vtkCellLocator.cxx @@ -219,7 +219,7 @@ int vtkCellLocator::IntersectWithLine(const double p1[3], const double p2[3], do // now, do the expensive GetCell call and the expensive // intersect with line call this->DataSet->GetCell(cId, cell); - if (cell->IntersectWithLine(p1, p2, tol, t, x, pcoords, subId)) + if (cell->IntersectWithLine(p1, p2, tol, t, x, pcoords, subId) && t < tBest) { // Make sure that intersection occurs within this octant or else spurious cell // intersections can occur behind this bin which are not the correct answer.