Frame.to_world_coordinates

Frame.to_world_coordinates(obj_in_lcf)[source]

Returns the object’s coordinates in the global coordinate frame.

Parameters:
obj_in_lcf[float, float, float] | compas.geometry.Geometry

An object in local coordinate system of the frame.

Returns:
compas.geometry.Geometry

The object in the world coordinate frame.

Notes

If you pass a list of floats, it is assumed to represent a point.

Examples

>>> from compas.geometry import Point
>>> frame = Frame([1, 1, 1], [0.68, 0.68, 0.27], [-0.67, 0.73, -0.15])
>>> pl = Point(1.632, -0.090, 0.573)  # point in frame
>>> pw = frame.to_world_coordinates(pl)  # point in wcf
>>> print(frame.to_local_coordinates(pw))
Point(x=1.632, y=-0.090, z=0.573)