trimesh.boolean
boolean.py
Do boolean operations on meshes using either Blender or OpenSCAD.
- trimesh.boolean.boolean_automatic(meshes, operation, **kwargs)
Automatically pick an engine for booleans based on availability.
- Parameters
meshes (list of Trimesh) – Meshes to be booleaned
operation (str) – Type of boolean, i.e. ‘union’, ‘intersection’, ‘difference’
- Returns
result – Result of boolean operation
- Return type
- trimesh.boolean.difference(meshes, engine=None, **kwargs)
Compute the boolean difference between a mesh an n other meshes.
- Parameters
meshes (list of trimesh.Trimesh) – Meshes to be processed
engine (str) – Which backend to use, i.e. ‘blender’ or ‘scad’
- Returns
difference
- Return type
a - (other meshes), **kwargs for a Trimesh
- trimesh.boolean.intersection(meshes, engine=None, **kwargs)
Compute the boolean intersection between a mesh an n other meshes.
- Parameters
meshes (list of trimesh.Trimesh) – Meshes to be processed
engine (str) – Which backend to use, i.e. ‘blender’ or ‘scad’
- Returns
intersection – volume that is contained by all meshes
- Return type
**kwargs for a Trimesh object of the
- trimesh.boolean.union(meshes, engine=None, **kwargs)
Compute the boolean union between a mesh an n other meshes.
- Parameters
meshes (list of trimesh.Trimesh) – Meshes to be processed
engine (str) – Which backend to use, i.e. ‘blender’ or ‘scad’
- Returns
union
- Return type
a + (other meshes), **kwargs for a Trimesh