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: :class:`compas.data.Data`
A COMPAS data object.
- is_selectedbool, optional
Whether the object is selected. Default to False.
- is_visiblebool, optional
Whether to show object. Default to True.
- show_pointsbool, optional
Whether to show points/vertices of the object. Default to False.
- show_linesbool, optional
Whether to show lines/edges of the object. Default to True.
- show_facesbool, optional
Whether to show faces of the object. Default to True.
- pointcolorUnion[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.
- linecolorUnion[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.
- facecolorUnion[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.
- linewidthint, optional
The line width to be drawn on screen Default to 1.
- pointsizeint, optional
The point size to be drawn on screen Default to 10.
- opacityfloat, optional
The opacity of the object. Default to 1.0.
- **kwargsdict, optional
Additional visualization options for specific objects.
- Returns
compas_view2.objects.Object
The added object.