MeshArtist
-
class
compas_blender.artists.MeshArtist(mesh)[source] Bases:
compas_blender.artists._artist.BaseArtistA mesh artist defines functionality for visualising COMPAS meshes in Blender.
- Parameters
mesh (
compas.datastructures.Mesh) – A COMPAS mesh.settings (dict, optional) – A dict with custom visualisation settings.
- Attributes
mesh (
compas.datastructures.Mesh) – The COMPAS mesh associated with the artist.settings (dict) – Default settings for color, scale, tolerance, …
Examples
import compas from compas.datastructures import Mesh from compas_blender.artists import MeshArtist mesh = Mesh.from_obj(compas.get('faces.obj')) MeshArtist(mesh).draw()Methods
__init__(mesh)Initialize self.
build(item, **kwargs)Build an artist corresponding to the item type.
clear()Clear all objects previously drawn by this artist.
draw()Draw the mesh using the chosen visualisation settings.
draw_collection(collection)Draw a collection of items.
draw_edges([edges, color])Draw a selection of edges.
draw_faces([faces, color])Draw a selection of faces.
Draw the mesh.
draw_vertices([vertices, color])Draw a selection of vertices.
redraw()Trigger a redraw.
register(item_type, artist_type)Register a type of COMPAS object with a Blender artist.