PrimitiveArtist

class compas_rhino.artists.PrimitiveArtist(primitive, color=None, layer=None)[source]

Bases: compas_rhino.artists._artist.BaseArtist

Base class for artists for geometry primitives.

Parameters
  • primitive (compas.geometry.Primitive) – The geometry of the primitive.

  • color (3-tuple, optional) – The RGB components of the base color of the primitive.

  • layer (str, optional) – The layer in which the primitive should be contained.

Attributes
  • primitive (compas.geometry.Primitive) – The geometry of the primitive.

  • name (str) – The name of the primitive.

  • color (tuple) – The RGB components of the base color of the primitive.

  • layer (str) – The layer in which the primitive should be contained.

Methods

__init__(primitive[, color, layer])

Initialize self.

build(item, **kwargs)

Build an artist corresponding to the item type.

clear()

clear_layer()

Clear the layer containing the artist.

draw()

redraw()

register(item_type, artist_type)