MeshObject

class compas.scene.MeshObject[source]

Bases: SceneObject

Base class for all mesh scene objects.

Parameters:
meshcompas.datastructures.Mesh

A COMPAS mesh.

Attributes:
meshcompas.datastructures.Mesh

The mesh data structure.

vertex_xyzdict[int, list[float]]

View coordinates of the vertices. Defaults to the real coordinates.

colorcompas.colors.Color

The base RGB color of the mesh.

vertexcolorcompas.colors.ColorDict

Vertex colors.

edgecolorcompas.colors.ColorDict

Edge colors.

facecolorcompas.colors.ColorDict

Face colors.

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 True.

Methods

clear

Clear all components 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 mesh.

draw_edges

Draw the edges of the mesh.

draw_faces

Draw the faces of the mesh.

draw_mesh

Draw the mesh of the mesh.

draw_vertices

Draw the vertices of the mesh.

Inherited Methods

add

Add a child item to the scene object.