VolMeshArtist

class compas.artists.VolMeshArtist(*args, **kwargs)[source]

Bases: Artist

Artist for drawing volmesh data structures.

Parameters

volmesh (compas.datastructures.VolMesh) – A COMPAS volmesh.

Attributes
  • volmesh (compas.datastructures.VolMesh) – The COMPAS volmesh associated with the artist.

  • vertices (list[int]) – The list of vertices to draw. Default is a list of all vertices of the volmesh.

  • edges (list[tuple[int, int]]) – The list of edges to draw. Default is a list of all edges of the volmesh.

  • faces (list[int]) – The list of faces to draw. Default is a list of all faces of the volmesh.

  • cells (list[int]) – The list of cells to draw. Default is a list of all cells of the volmesh.

  • vertex_xyz (dict[int, list[float]]) – The view coordinates of the vertices. By default, the actual vertex coordinates are used.

  • vertex_color (dict[int, tuple[float, float, float]]) – Mapping between vertices and colors. Missing vertices get the default vertex color: default_vertexcolor.

  • edge_color (dict[tuple[int, int], tuple[float, float, float]]) – Mapping between edges and colors. Missing edges get the default edge color: default_edgecolor.

  • face_color (dict[int, tuple[float, float, float]]) – Mapping between faces and colors. Missing faces get the default face color: default_facecolor.

  • cell_color (dict[int, tuple[float, float, float]]) – Mapping between cells and colors. Missing cells get the default cell color: default_facecolor.

  • vertex_text (dict[int, str]) – Mapping between vertices and text labels.

  • edge_text (dict[tuple[int, int], str]) – Mapping between edges and text labels.

  • face_text (dict[int, str]) – Mapping between faces and text lables.

  • cell_text (dict[int, str]) – Mapping between cells and text lables.

Class Attributes
  • default_vertexcolor (tuple[float, float, float]) – The default color of the vertices of the mesh that don’t have a specified color.

  • default_edgecolor (tuple[float, float, float]) – The default color of the edges of the mesh that don’t have a specified color.

  • default_facecolor (tuple[float, float, float]) – The default color of the faces of the mesh that don’t have a specified color.

  • default_cellcolor (tuple[float, float, float]) – The default color of the cells of the mesh that don’t have a specified color.

Methods

clear_cells

Clear the cells of the mesh.

clear_edges

Clear the edges of the mesh.

clear_faces

Clear the faces of the mesh.

clear_vertices

Clear the vertices of the mesh.

draw_cells

Draw the cells of the mesh.

draw_edges

Draw the edges of the mesh.

draw_faces

Draw the faces of the mesh.

draw_vertices

Draw the vertices of the mesh.

Inherited Methods

build

Build an artist corresponding to the item type.

build_as

Build an artist with the given type.

clear

Clear all objects from the view.

draw

The main drawing method.

draw_collection

Drawing method for drawing an entire collection of objects.

redraw

Redraw the view.

register

Register an artist type to a data type.