PrimitiveArtist

class compas.artists.PrimitiveArtist(*args, **kwargs)[source]

Bases: compas.artists.artist.Artist

Base class for artists for geometry primitives.

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

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

Class Attributes

default_color (tuple) – The default rgb color value of the primitive ((0, 0, 0)).

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

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

Methods

build(item, **kwargs)

Build an artist corresponding to the item type.

build_as(item, artist_type, **kwargs)

clear()

draw()

draw_collection(collection)

get_artist_cls(data, **kwargs)

redraw()

register(item_type, artist_type)