MeshObject

class MeshObject[source]

Bases: ViewerSceneObject, MeshObject

Viewer scene object for displaying COMPAS Mesh geometry.

Parameters:
meshcompas.datastructures.Mesh

A COMPAS mesh.

hide_coplanaredgesbool, optional

True to hide the coplanar edges. It will override the value in the config file.

use_vertexcolorsbool, optional

True to use vertex color. It will override the value in the config file.

**kwargsdict, optional

Additional options for the compas_viewer.scene.ViewerSceneObject.

Attributes:
meshcompas.datastructures.Mesh

The mesh data structure.

vertexcolorcompas.colors.Colordict

Vertex colors.

use_vertexcolorsbool

True to use vertex color. Defaults to False.

hide_coplanaredgesbool

True to hide the coplanar edges.

Methods

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

Clear the object

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 object from its buffers

draw_instance

Draw the object instance for picking

draw_mesh

Draw the mesh of the mesh.

init

Initialize the object

make_buffer_from_data

Create buffers from point/line/face data.

make_buffers

Create all buffers from object's data

update

Update the object

update_buffer_from_data

Update existing buffers from point/line/face data.

update_buffers

Update all buffers from object's data