local_to_world_coordinates_numpy

compas.geometry.local_to_world_coordinates_numpy(frame, rst)[source]

Convert local coordinates to global (world) coordinates.

Parameters
  • frame (Frame or [point, xaxis, yaxis]) – The local coordinate system.

  • rst (array-like) – The coordinates of the points wrt the local coordinate system.

Returns

array – The world coordinates of the given points.

Notes

origin and uvw together form the frame of local coordinates.

Examples

>>> from compas.geometry import Point, Frame
>>> frame = Frame([0, 1, 0], [3, 4, 1], [1, 5, 9])
>>> rst = [Point(3.726, 4.088, 1.550)]
>>> xyz = local_to_world_coordinates_numpy(frame, rst)
>>> np.allclose(xyz, [[2.000, 3.000, 5.000]], rtol=1e-3)
True