NetworkArtist

class compas_rhino.artists.NetworkArtist(*args, **kwargs)[source]

Bases: RhinoArtist, NetworkArtist

Artist for drawing network data structures.

Parameters
  • network (compas.datastructures.Network) – A COMPAS network.

  • layer (str, optional) – The parent layer of the network.

  • nodes (list[int], optional) – A list of node identifiers. Default is None, in which case all nodes are drawn.

  • edges (list[tuple[int, int]], optional) – A list of edge identifiers. The default is None, in which case all edges are drawn.

  • nodecolor (tuple[int, int, int] or dict[int, tuple[int, int, int]], optional) – The color of the nodes.

  • edgecolor (tuple[int, int, int] or dict[tuple[int, int], tuple[int, int, int]], optional) – The color of the edges.

  • show_nodes (bool, optional) – If True, draw the nodes of the network.

  • show_edges (bool, optional) – If True, draw the edges of the network.

  • **kwargs (dict, optional) – Additional keyword arguments. For more info, see RhinoArtist and NetworkArtist.

Methods

clear

Delete all objects drawn by this artist.

clear_edgelabels

Delete all edge labels drawn by this artist.

clear_edges

Delete all edges drawn by this artist.

clear_nodelabels

Delete all node labels drawn by this artist.

clear_nodes

Delete all nodes drawn by this artist.

draw

Draw the network using the chosen visualisation settings.

draw_edgelabels

Draw labels for a selection of edges.

draw_edges

Draw a selection of edges.

draw_nodelabels

Draw labels for a selection nodes.

draw_nodes

Draw a selection of nodes.

Inherited Methods

build

Build an artist corresponding to the item type.

build_as

Build an artist with the given type.

clear_layer

Clear the layer of the artist.

draw_collection

Drawing method for drawing an entire collection of objects.

redraw

Redraw the view.

register

Register an artist type to a data type.