MeshArtist

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

Bases: compas_blender.artists.artist.BlenderArtist, compas.artists.meshartist.MeshArtist

A mesh artist defines functionality for visualising COMPAS meshes in Blender.

Parameters
  • mesh (compas.datastructures.Mesh) – A COMPAS mesh.

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

  • vertices (list of int, optional) – A list of vertex identifiers. Default is None, in which case all vertices are drawn.

  • edges (list, optional) – A list of edge keys (as uv pairs) identifying which edges to draw. The default is None, in which case all edges are drawn.

  • faces (list, optional) – A list of face identifiers. The default is None, in which case all faces are drawn.

  • vertexcolor (rgb-tuple or dict of rgb-tuples, optional) – The color specification for the vertices.

  • edgecolor (rgb-tuple or dict of rgb-tuples, optional) – The color specification for the edges.

  • facecolor (rgb-tuple or dict of rgb-tuples, optional) – The color specification for the faces.

  • show_mesh (bool, optional)

  • show_vertices (bool, optional)

  • show_edges (bool, optional)

  • show_faces (bool, optional)

Attributes
  • vertexcollection (bpy.types.Collection) – The collection containing the vertices.

  • edgecollection (bpy.types.Collection) – The collection containing the edges.

  • facecollection (bpy.types.Collection) – The collection containing the faces.

  • vertexlabelcollection (bpy.types.Collection) – The collection containing the vertex labels.

  • edgelabelcollection (bpy.types.Collection) – The collection containing the edge labels.

  • facelabelcollection (bpy.types.Collection) – The collection containing the face labels.

Attributes

edgecollection

edgelabelcollection

facecollection

facelabelcollection

facenormalcollection

vertexcollection

vertexlabelcollection

vertexnormalcollection

Inherited Attributes

AVAILABLE_CONTEXTS

CONTEXT

ITEM_ARTIST

collection

color

default_color

default_edgecolor

default_edgewidth

default_facecolor

default_vertexcolor

default_vertexsize

edge_color

edge_text

edge_width

edges

face_color

face_text

faces

mesh

vertex_color

vertex_size

vertex_text

vertex_xyz

vertices

Methods

clear_edges

clear_faces

clear_vertices

draw

Draw the mesh using the chosen visualization settings.

draw_edgelabels

Draw labels for a selection of edges.

draw_edges

Draw a selection of edges.

draw_facelabels

Draw labels for a selection of faces.

draw_facenormals

Draw the normals of the faces.

draw_faces

Draw a selection of faces.

draw_mesh

Draw the mesh.

draw_vertexlabels

Draw labels for a selection vertices.

draw_vertexnormals

Draw the normals at the vertices of the mesh.

draw_vertices

Draw a selection of vertices.

Inherited Methods

build

Build an artist corresponding to the item type.

build_as

clear

draw_collection

redraw

register