LineArtist
-
class
compas_rhino.artists.
LineArtist
(primitive, color=None, layer=None)[source] Bases:
compas_rhino.artists._primitiveartist.PrimitiveArtist
Artist for drawing lines.
- Parameters
primitive (
compas.geometry.Line
) – A COMPAS line.
Notes
See
compas_rhino.artists.PrimitiveArtist
for all other parameters.Examples
import random from compas.geometry import Pointcloud from compas.geometry import Vector from compas.geometry import Line from compas.utilities import i_to_rgb import compas_rhino from compas_rhino.artists import LineArtist pcl = Pointcloud.from_bounds(10, 10, 10, 100) compas_rhino.clear_layer("Test::LineArtist") for point in pcl.points: line = Line(point, point + Vector(1, 0, 0)) artist = LineArtist(line, color=i_to_rgb(random.random()), layer="Test::LineArtist") artist.draw()
Methods
__init__
(primitive[, color, layer])Initialize self.
build
(item, **kwargs)Build an artist corresponding to the item type.
clear
()Clear the layer containing the artist.
draw
([show_points])Draw the line.
redraw
()register
(item_type, artist_type)