VectorArtist

class compas_blender.artists.VectorArtist(*args, **kwargs)[source]

Bases: compas_blender.artists.artist.BlenderArtist, compas.artists.primitiveartist.PrimitiveArtist

Artist for drawing vectors.

Parameters

primitive (compas.geometry.Vector) – A COMPAS vector.

Notes

See compas_blender.artists.PrimitiveArtist for all other parameters.

Examples

import random
from compas.geometry import Pointcloud
from compas.geometry import Vector
from compas.utilities import i_to_rgb
from compas_blender.artists import VectorArtist

pcl = Pointcloud.from_bounds(10, 10, 10, 100)

for point in pcl.points:
    vector = Vector(0, 0, 1)
    artist = VectorArtist(vector, color=i_to_rgb(random.random()))
    artist.draw(point=point)

Methods

build(item, **kwargs)

Build an artist corresponding to the item type.

build_as(item, artist_type, **kwargs)

clear()

Delete all objects created by the artist.

draw([color, point, show_point])

Draw the vector.

draw_collection(collection)

get_artist_cls(data, **kwargs)

redraw()

register(item_type, artist_type)