VolMeshObject

class compas.scene.VolMeshObject[source]

Bases: SceneObject

Scene object for drawing volmesh data structures.

Parameters:
volmeshcompas.datastructures.VolMesh

A COMPAS volmesh.

Attributes:
volmeshcompas.datastructures.VolMesh

The COMPAS volmesh associated with the scene object.

vertex_xyzdict[int, list[float]]

The view coordinates of the vertices. By default, the actual vertex coordinates are used.

vertexcolorcompas.colors.ColorDict

Mapping between vertices and colors. Missing vertices get the default vertex color: default_vertexcolor.

edgecolorcompas.colors.ColorDict

Mapping between edges and colors. Missing edges get the default edge color: default_edgecolor.

facecolorcompas.colors.ColorDict

Mapping between faces and colors. Missing faces get the default face color: default_facecolor.

cellcolorcompas.colors.ColorDict

Mapping between cells and colors. Missing cells get the default cell color: default_facecolor.

vertexsizefloat

The size of the vertices. Default is 1.0.

edgewidthfloat

The width of the edges. Default is 1.0.

show_verticesUnion[bool, sequence[float]]

Flag for showing or hiding the vertices, or a list of keys for the vertices to show. Default is False.

show_edgesUnion[bool, sequence[tuple[int, int]]]

Flag for showing or hiding the edges, or a list of keys for the edges to show. Default is True.

show_facesUnion[bool, sequence[int]]

Flag for showing or hiding the faces, or a list of keys for the faces to show. Default is False.

show_cellsbool

Flag for showing or hiding the cells, or a list of keys for the cells to show. Default is True.

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

Draw the volmesh.

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

add

Add a child item to the scene object.

clear

The main clearing method.