volmesh_transformed
- compas.datastructures.volmesh_transformed(volmesh, transformation)[source]
Return a transformed copy of the volmesh.
- Parameters
volmesh (
VolMesh
) – The volmesh.transformation (
Transformation
) – The transformation.
- Returns
VolMesh
– A transformed independent copy of volmesh.
Notes
The original volmesh is not modified. Instead a transformed independent copy is returned.
Examples
>>> from compas.datastructures import VolMesh >>> from compas.geometry import Rotation >>> volmesh1 = VolMesh.from_obj(compas.get('boxes.obj')) >>> T = Rotation.from_axis_and_angle([0, 0, 1], math.pi / 4) >>> volmesh2 = volmesh_transformed(volmesh1, T)