PolylineArtist
-
class
compas_rhino.artists.
PolylineArtist
(primitive, color=None, layer=None)[source] Bases:
compas_rhino.artists._primitiveartist.PrimitiveArtist
Artist for drawing polylines.
- Parameters
primitive (
compas.geometry.Polyline
) – A COMPAS polyline.
Notes
See
compas_rhino.artists.PrimitiveArtist
for all other parameters.Examples
import random from compas.geometry import Pointcloud from compas.geometry import Polyline from compas.geometry import Translation from compas.utilities import i_to_rgb import compas_rhino from compas_rhino.artists import PolylineArtist pcl = Pointcloud.from_bounds(10, 10, 10, 100) tpl = Polyline(Polygon.from_sides_and_radius_xy(7, 0.8).points) compas_rhino.clear_layer("Test::PolylineArtist") for point in pcl.points: polyline = tpl.transformed(Translation.from_vector(point)) artist = PolylineArtist(polygon, color=i_to_rgb(random.random()), layer="Test::PolylineArtist") 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 polyline.
redraw
()register
(item_type, artist_type)