Mesh.transform

Mesh.transform(transformation)[source]

Transform a mesh.

Parameters
  • mesh (compas.datastructures.Mesh) – The mesh.

  • transformation (compas.geometry.Transformation) – The transformation.

Notes

The mesh is modified in-place.

Examples

>>> mesh = Mesh.from_obj(compas.get('cube.obj'))
>>> T = matrix_from_axis_and_angle([0, 0, 1], pi / 4)
>>> tmesh = mesh.copy()
>>> mesh_transform(tmesh, T)