NetworkArtist

class compas_rhino.artists.NetworkArtist(network, layer=None)[source]

Bases: compas_rhino.artists._artist.BaseArtist

Artist for drawing network data structures.

Parameters
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

__init__(network[, layer])

Initialize self.

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)