MeshArtist
- class compas_blender.artists.MeshArtist(item, **kwargs)[source]
Bases:
BlenderArtist
,MeshArtist
Artist for drawing mesh data structures in Blender.
- Parameters
mesh (
Mesh
) – A COMPAS mesh.collection (str | bpy.types.Collection) – The Blender scene collection the object(s) created by this artist belong to.
- Attributes
vertexcollection (bpy.types.Collection) – The collection containing the vertices.
edgecollection (bpy.types.Collection) – The collection containing the edges.
facecollection (bpy.types.Collection) – The collection containing the faces.
vertexlabelcollection (bpy.types.Collection) – The collection containing the vertex labels.
edgelabelcollection (bpy.types.Collection) – The collection containing the edge labels.
facelabelcollection (bpy.types.Collection) – The collection containing the face labels.
Examples
Use the Blender artist explicitly.
from compas.datastructures import Mesh from compas_blender.artists import MeshArtist mesh = Mesh.from_meshgrid(10, 10) artist = MeshArtist(mesh) artist.draw()
Or, use the artist through the plugin mechanism.
from compas.datastructures import Mesh from compas.artists import Artist mesh = Mesh.from_meshgrid(10, 10) artist = Artist(mesh) artist.draw()
Methods
Clear all objects from the view.
Clear the objects contained in the edge collection (
self.edgecollection
).Clear the objects contained in the face collection (
self.facecollection
).Clear the objects contained in the vertex collection (
self.vertexcollection
).Draw the mesh.
Draw labels for a selection of edges.
Draw a selection of edges.
Draw labels for a selection of faces.
Draw the normals of the faces.
Draw a selection of faces.
Draw labels for a selection vertices.
Draw the normals at the vertices of the mesh.
Draw a selection of vertices.
Inherited Methods
Build an artist corresponding to the item type.
Build an artist with the given type.
Drawing method for drawing an entire collection of objects.
Draw the mesh of the mesh.
Redraw the view.
Register an artist type to a data type.