CircleArtist

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

Bases: compas_rhino.artists._primitiveartist.PrimitiveArtist

Artist for drawing circles.

Parameters

primitive (compas.geometry.Circle) – A COMPAS circle.

Notes

See compas_rhino.artists.PrimitiveArtist for all other parameters.

Examples

import random
from compas.geometry import Pointcloud
from compas.geometry import Circle
from compas.utilities import i_to_rgb

import compas_rhino
from compas_rhino.artists import CircleArtist

pcl = Pointcloud.from_bounds(10, 10, 10, 100)
tpl = Circle([[0, 0, 0], [0, -1, 0]], 0.7)

compas_rhino.clear_layer("Test::CircleArtist")

for point in pcl.points:
    circle = tpl.copy()
    circle.plane.point = point
    artist = CircleArtist(circle, color=i_to_rgb(random.random()), layer="Test::CircleArtist")
    artist.draw()

Methods

draw([show_point, show_normal])

Draw the circle.

Inherited Methods

build(item, **kwargs)

Build an artist corresponding to the item type.

clear()

clear_layer()

Clear the layer containing the artist.

redraw()

register(item_type, artist_type)