Traversing an Octree in Python?

Hi, I am trying to use an Octree for mesh / ray intersection (simple raycasting)
I can move my data into the Octree structure, but I need now to address the individual nodes.
The C++ documentation has a Traverse function, but doesn’t seem to exist in the Python API…?
Any way I can move through the different nodes and get their coordinates?
Thanks!

1 Like

I’m encountering the same issue. The example on this page (http://www.open3d.org/docs/latest/python_api/open3d.geometry.Octree.html) implies that it should work within the python function, but when attempting this code it generates the error:

AttributeError: ‘open3d.cpu.pybind.geometry.Octree’ object has no attribute ‘traverse’

Ok. This is working but only in the very latest version (1df4a7c). The documentation is here:
http://www.open3d.org/docs/latest/python_api/open3d.geometry.Octree.html

You can install using pip (will work in conda using pip as well), but you have to specify the build.

Pip example (Python 3.7): pip install --user --pre https://storage.googleapis.com/open3d-releases-master/python-wheels/open3d-0.12.0+1df4a7c-cp37-cp37m-linux_x86_64.whl