# vtkOBBTree with Multiple Lines

**URL:** https://discourse.vtk.org/t/vtkobbtree-with-multiple-lines/3459
**Category:** Support
**Created:** [June 3, 2020, 4:21pm UTC](https://discourse.vtk.org/t/vtkobbtree-with-multiple-lines/3459 "2020-06-03T16:21:22Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![akaszynski](https://discourse.vtk.org/user_avatar/discourse.vtk.org/akaszynski/32/10751_2.png) [@akaszynski](https://discourse.vtk.org/u/akaszynski)
#### Post date: [June 3, 2020, 4:21pm UTC](https://discourse.vtk.org/t/vtkobbtree-with-multiple-lines/3459/1 "2020-06-03T16:21:22Z")

</div>

Hello,

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

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

```

---

<div class="post-metadata">

### Author: ![Paulo\_Carvalho](https://discourse.vtk.org/user_avatar/discourse.vtk.org/paulo_carvalho/32/370_2.png) [@Paulo\_Carvalho](https://discourse.vtk.org/u/Paulo_Carvalho)
#### Post date: [June 4, 2020, 1:04pm UTC](https://discourse.vtk.org/t/vtkobbtree-with-multiple-lines/3459/2 "2020-06-04T13:04:15Z")

</div>

Hi, Alex,

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

regards,

paulo

---

<div class="post-metadata">

### Author: ![akaszynski](https://discourse.vtk.org/user_avatar/discourse.vtk.org/akaszynski/32/10751_2.png) [@akaszynski](https://discourse.vtk.org/u/akaszynski)
#### Post date: [June 4, 2020, 2:56pm UTC](https://discourse.vtk.org/t/vtkobbtree-with-multiple-lines/3459/3 "2020-06-04T14:56:01Z")

</div>

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.
