BlenderMesh
- class compas_blender.conversions.BlenderMesh[source]
Bases:
BlenderGeometry
Wrapper for Blender meshes.
- Attributes
object (bpy.types.Object) – The Blender scene object.
geometry (bpy.types.Mesh) – The mesh data block.
bmesh (bpy.types.BMesh) – The mesh data structure.
location (
Point
) – The location of the object in the scene.vertices (List[
Point
]) – The mesh vertex locations.faces (List[List[
int
]]) – The mesh face vertices.
Examples
import os import compas from compas_blender.conversions import BlenderMesh mesh = BlenderMesh.from_monkey().to_compas() mesh = mesh.subdivide(k=2) path = os.path.join(os.path.expanduser(~), 'Desktop', 'monkey.json') compas.json_dump(mesh, path)
Methods
Construct a Blender mesh wrappper from a BMesh.
Construct a Blender mesh wrappper from the Blender monkey.
Convert the Blender mesh to a COMPAS mesh.
Inherited Methods
Construct a Blender object wrapper from an existing Blender data block.
Construct a Blender object wrapper from an existing Blender object.
Construct a Blender object wrapper from an existing Blender object.
Transform the Blender object.