LineArtist

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

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

Artist for drawing lines.

Parameters
  • line (compas.geometry.Line) – A COMPAS line.

  • collection (str or bpy.types.Collection) – The name of the collection the object belongs to.

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

from compas_blender.artists import LineArtist

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

for point in pcl.points:
    line = Line(point, point + Vector(1, 0, 0))
    artist = LineArtist(line, color=i_to_rgb(random.random()))
    artist.draw()

Inherited Attributes

AVAILABLE_CONTEXTS

CONTEXT

ITEM_ARTIST

collection

color

default_color

primitive

Methods

draw

Draw the line.

Inherited Methods

build

Build an artist corresponding to the item type.

build_as

clear

draw_collection

redraw

register