open3d.visualization.ExternalVisualizer#

class open3d.visualization.ExternalVisualizer(address='tcp://127.0.0.1:51454', timeout=10000)#

This class allows to send data to an external Visualizer

Example

This example sends a point cloud to the visualizer:

import open3d as o3d
import numpy as np
ev = o3d.visualization.ExternalVisualizer()
pcd = o3d.geometry.PointCloud(o3d.utility.Vector3dVector(np.random.rand(100,3)))
ev.set(pcd)
Parameters:
  • address – The address where the visualizer is running. The default is localhost.

  • timeout – The timeout for sending data in milliseconds.

__init__(address='tcp://127.0.0.1:51454', timeout=10000)#
draw(geometry=None, *args, **kwargs)#

This function has the same functionality as ‘set’.

This function is compatible with the standalone ‘draw’ function and can be used to redirect calls to the external visualizer. Note that only the geometry argument is supported, all other arguments will be ignored.

Example

Here we use draw with the default external visualizer::

import open3d as o3d

torus = o3d.geometry.TriangleMesh.create_torus() sphere = o3d.geometry.TriangleMesh.create_sphere()

draw = o3d.visualization.EV.draw draw([ {‘geometry’: sphere, ‘name’: ‘sphere’},

{‘geometry’: torus, ‘name’: ‘torus’, ‘time’: 1} ])

# now use the standard draw function as comparison draw = o3d.visualization.draw draw([ {‘geometry’: sphere, ‘name’: ‘sphere’},

{‘geometry’: torus, ‘name’: ‘torus’, ‘time’: 1} ])

Parameters:
  • geometry – The geometry to draw. This can be a geometry object, a

  • the (list of geometries. To pass additional information along with) –

  • dictionary (geometry we can use a dictionary. Supported keys for the) –

  • 'geometry' (are) –

  • 'name'

  • 'time'. (and) –

set(obj=None, path='', time=0, layer='', connection=None)#

Send Open3D objects for visualization to the visualizer.

Example

To quickly send a single object just write::

ev.set(point_cloud)

To place the object at a specific location in the scene tree do::

ev.set(point_cloud, path=’group/mypoints’, time=42, layer=’’)

Note that depending on the visualizer some arguments like time or layer may not be supported and will be ignored.

To set multiple objects use a list to pass multiple objects::

ev.set([point_cloud, mesh, camera])

Each entry in the list can be a tuple specifying all or some of the location parameters:

ev.set(objs=[(point_cloud,'group/mypoints', 1, 'layer1'),
             (mesh, 'group/mymesh'),
             camera
            ]
Parameters:
  • obj – A geometry or camera object or a list of objects. See the

  • instructions. (example seection for usage) –

  • path – A path describing a location in the scene tree.

  • time – An integer time value associated with the object.

  • layer – The layer associated with the object.

  • connection – A connection object to use for sending data. This parameter can be used to override the default object.

set_active_camera(path)#

Sets the active camera in the external visualizer

Note that this function is a placeholder for future functionality and not yet supported by the receiving visualizer.

Parameters:

path – A path describing a location in the scene tree.

set_time(time)#

Sets the time in the external visualizer

Note that this function is a placeholder for future functionality and not yet supported by the receiving visualizer.

Parameters:

time – The time value