App.add
- App.add(data, name=None, is_selected=None, is_visible=None, show_points=None, show_lines=None, show_faces=None, pointcolor=None, linecolor=None, facecolor=None, linewidth=None, pointsize=None, opacity=None, **kwargs)[source]
Add a COMPAS object.
- Parameters:
data (
compas.data.Data) – A COMPAS data object.is_selected (bool, optional) – Whether the object is selected. Default to False.
is_visible (bool, optional) – Whether to show object. Default to True.
show_points (bool, optional) – Whether to show points/vertices of the object. Default to False.
show_lines (bool, optional) – Whether to show lines/edges of the object. Default to True.
show_faces (bool, optional) – Whether to show faces of the object. Default to True.
pointcolor (Union[Color, Dict[Union[str, int], Color]], optional) – The color or the dict of colors of the points. Default to compas_view2.objects.Object.default_color_points.
linecolor (Union[Color, Dict[Union[str, int], Color]], optional) – The color or the dict of colors of the lines. Default to compas_view2.objects.Object.default_color_lines.
facecolor (Union[Color, Dict[Union[str, int], Color]], optional) – The color or the dict of colors of the faces. Default to compas_view2.objects.Object.default_color_faces.
linewidth (int, optional) – The line width to be drawn on screen Default to 1.
pointsize (int, optional) – The point size to be drawn on screen Default to 10.
opacity (float, optional) – The opacity of the object. Default to 1.0.
**kwargs (dict, optional) – Additional visualization options for specific objects.
- Returns:
compas_view2.objects.Object– The added object.