MeshObject
-
class
compas_view2.objects.MeshObject(data, name=None, is_selected=False, show_vertices=False, show_edges=True, show_faces=True, facecolor=None, linecolor=None, pointcolor=None, color=None, linewidth=1, pointsize=10, hide_coplanaredges=False, opacity=1, vertices=None, edges=None, faces=None)[source] Bases:
compas_view2.objects.bufferobject.BufferObjectObject for displaying COMPAS mesh data structures.
- Parameters
data (:class: compas.datastructures.Mesh) – Mesh for the viewer
name (string) – name of the object
show_vertices (bool) – True to show vertices
show_edges (bool) – True to show edges
show_faces (bool) – True to show faces
facecolor (list) – Face color
linecolor (list) – Line color
pointcolor (list) – Face color
linewidth (float) – Line width
pointsize (float) – Point size
hide_coplanaredges (bool) – True to hide the coplanar edges
opacity (float) – The opacity of mesh
vertices (list) – Subset of vertices to be displayed
edges (list) – Subset of edges to be displayed
faces (list) – Subset of faces to be displayed
- Attributes
facecolor (list) – Face color
linecolor (list) – Line color
pointcolor (list) – Face color
linewidth (float) – Line width
pointsize (float) – Point size
hide_coplanaredges (bool) – True to hide the coplanar edges
opacity (float) – The opacity of mesh
vertices (list) – Subset of vertices to be displayed
edges (list) – Subset of edges to be displayed
faces (list) – Subset of faces to be displayed
Methods
build(data, **kwargs)Build an object class according to its corrensponding data type
create()draw(shader[, wireframe, is_lighted])Draw the object from its buffers
draw_instance(shader[, wireframe])Draw the object instance for picking
edit()init()Initialize the object
make_buffer_from_data(data)Create buffers from point/line/face data.
Create all buffers from object’s data
register(dtype, vtype)Register an object class to its corrensponding data type
update()Update the object
update_buffer_from_data(data, buffer[, …])Update existing buffers from point/line/face data.
Update all buffers from object’s data