MeshArtist

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

Bases: RhinoArtist, MeshArtist

Artists for drawing mesh data structures.

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

  • layer (str, optional) – The name of the layer that will contain the mesh.

  • vertices (list[int], optional) – Selection of vertices to draw.

  • edges (list[tuple[int, int]], optional) – Selection of edges to draw.

  • faces (list[int], optional) – Selection of faces to draw.

  • vertexcolor (tuple[int, int, int] or dict[int, tuple[int, int, int]], optional) – Color of the vertices. Default color is MeshArtists.default_vertexcolor.

  • edgecolor (tuple[int, int, int] or dict[tuple[int, int], tuple[int, int, int]], optional) – Color of the edges. Default color is MeshArtists.default_edgecolor.

  • facecolor (tuple[int, int, int] or dict[int, tuple[int, int, int]], optional) – Color of the faces. Default color is MeshArtists.default_facecolor.

  • show_vertices (bool, optional) – If True, draw the vertices.

  • show_edges (bool, optional) – If True, draw the edges.

  • show_faces (bool, optional) – If True, draw the faces.

  • **kwargs (dict, optional) – Additional keyword arguments. For more info, see RhinoArtist and MeshArtist.

Class Attributes
  • default_color (tuple[int, int, int]) – Default base color of the mesh.

  • default_vertexcolor (tuple[int, int, int]) – Default color for vertices.

  • default_edgecolor (tuple[int, int, int]) – Default color for edges.

  • default_facecolor (tuple[int, int, int]) – Default color for faces.

Methods

clear

Delete all objects drawn by this artist.

clear_edgelabels

Delete all edge labels drawn by this artist.

clear_edges

Delete all edges drawn by this artist.

clear_facelabels

Delete all face labels drawn by this artist.

clear_facenormals

Delete all face normals drawn by this artist.

clear_faces

Delete all faces drawn by this artist.

clear_mesh

Delete the mesh drawn by this artist.

clear_vertexlabels

Delete all vertex labels drawn by this artist.

clear_vertexnormals

Delete all vertex normals drawn by this artist.

clear_vertices

Delete all vertices drawn by this artist.

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 as a consolidated RhinoMesh.

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

Build an artist with the given type.

clear_layer

Clear the layer of the artist.

draw_collection

Drawing method for drawing an entire collection of objects.

redraw

Redraw the view.

register

Register an artist type to a data type.