volmesh_transformed

compas.datastructures.volmesh_transformed(volmesh, transformation)[source]

Transform a copy of volmesh.

Parameters
  • volmesh (compas.datastructures.VolMesh) – The volmesh.

  • transformation (compas.geometry.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)