transform_frames

compas.geometry.transform_frames(frames, T)[source]

Transform multiple frames with one transformation matrix.

Parameters:
framessequence[[point, vector, vector] | compas.geometry.Frame]

A list of frames to be transformed.

Tlist[list[float]] | compas.geometry.Transformation

The transformation to apply on the frames.

Returns:
list[[point, vector, vector]]

Transformed frames.

Examples

>>> from compas.geometry import Frame, matrix_from_axis_and_angle
>>> frames = [Frame([1, 0, 0], [1, 2, 4], [4, 7, 1]), Frame([0, 2, 0], [5, 2, 1], [0, 2, 1])]
>>> T = matrix_from_axis_and_angle([0, 2, 0], math.radians(45), point=[4, 5, 6])
>>> transformed_frames = transform_frames(frames, T)