vtkOBBTree with Multiple Lines

Hello,

Is there any way to support multiple line segments via vtk via python?

        points = vtk.vtkPoints()
        cell_ids = vtk.vtkIdList()
        poly_data.obbTree.IntersectWithLine(np.array(origin),
                                            np.array(end_point),
                                            points, cell_ids)
1 Like

Hi, Alex,

Judging by the documentation (https://vtk.org/doc/nightly/html/classvtkOBBTree.html) you have to iterate over the segments one-by-one.

regards,

paulo

Thanks! I saw that and figured that it was the case, but wasn’t sure if there was an undocumented feature that allowed array operations.

1 Like