Viewer.add

Viewer.add(item, parent=None, is_selected=False, is_locked=False, is_visible=True, show_points=None, show_lines=None, show_faces=None, pointscolor=None, linescolor=None, facescolor=None, lineswidth=None, pointssize=None, opacity=None, hide_coplanaredges=None, use_vertexcolors=None, **kwargs)[source]

Add an item to the scene. This function is inherent from compas.scene.Scene with additional functionalities.

Parameters:
itemUnion[compas.geometry.Geometry, compas.datastructures.Mesh]

The geometry to add to the scene.

parentcompas_viewer.scene.ViewerSceneObject, optional

The parent of the item.

is_selectedbool, optional

Whether the object is selected. Default to False.

is_lockedbool, optional

Whether the object is locked (not selectable). Default to False.

is_visiblebool, optional

Whether to show object. Default to True.

show_pointsbool, optional

Whether to show points/vertices of the object. It will override the value in the scene config file.

show_linesbool, optional

Whether to show lines/edges of the object. It will override the value in the scene config file.

show_facesbool, optional

Whether to show faces of the object. It will override the value in the scene config file.

pointscolorUnion[compas.colors.Color, dict[Any, compas.colors.Color], optional

The color or the dict of colors of the points. It will override the value in the scene config file.

linescolorUnion[compas.colors.Color, dict[Any, compas.colors.Color], optional

The color or the dict of colors of the lines. It will override the value in the scene config file.

facescolorUnion[compas.colors.Color, dict[Any, compas.colors.Color], optional

The color or the dict of colors the faces. It will override the value in the scene config file.

lineswidthfloat, optional

The line width to be drawn on screen It will override the value in the scene config file.

pointssizefloat, optional

The point size to be drawn on screen It will override the value in the scene config file.

opacityfloat, optional

The opacity of the object. It will override the value in the scene config file.

hide_coplanaredgesbool, optional

Whether to hide the coplanar edges of the mesh. It will override the value in the scene config file.

use_vertexcolorsbool, optional

Whether to use vertex color. It will override the value in the scene config file.

**kwargsdict, optional

The other possible parameters to be passed to the object.

Returns:
compas.scene.SceneObject

The scene object.