compas_rhino.artists.NetworkArtist
- class compas_rhino.artists.NetworkArtist(network, layer=None)[source]
Bases:
compas_rhino.artists._artist.BaseArtistArtist for drawing network data structures.
- Parameters
network (
compas.datastructures.Network) – A COMPAS network.layer (str, optional) – The parent layer of the network.
- Attributes
network (
compas.datastructures.Network) – The COMPAS network associated with the artist.layer (str) – The layer in which the network should be contained.
color_nodes (3-tuple) – Default color of the nodes.
color_edges (3-tuple) – Default color of the edges.
Methods
build(item, **kwargs)Build an artist corresponding to the item type.
clear()clear_by_name()Clear all objects in the “namespace” of the associated network.
clear_layer()Clear the main layer of the artist.
draw()Draw the network using the chosen visualisation settings.
draw_edgelabels([text, color])Draw labels for a selection of edges.
draw_edges([edges, color])Draw a selection of edges.
draw_nodelabels([text, color])Draw labels for a selection nodes.
draw_nodes([nodes, color])Draw a selection of nodes.
redraw()register(item_type, artist_type)Attributes
networknode_xyzdict: The view coordinates of the network nodes.