Origin.to_local_coordinates

Origin.to_local_coordinates(object_in_wcf)[source]

Returns the object’s coordinates in the local coordinate system of the frame.

Parameters

object_in_wcf (compas.geometry.Point or compas.geometry.Vector or compas.geometry.Frame or list of float) – An object in the world coordinate frame.

Returns

compas.geometry.Point or compas.geometry.Vector or compas.geometry.Frame – The object in the local coordinate system of the frame.

Notes

If you pass a list of float, 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])
>>> pw = Point(2, 2, 2) # point in wcf
>>> pl = frame.to_local_coordinates(pw) # point in frame
>>> frame.to_world_coordinates(pl)
Point(2.000, 2.000, 2.000)