Origin.local_to_local_coordinates

static Origin.local_to_local_coordinates(frame1, frame2, object_in_frame1)[source]

Returns the object’s coordinates in frame1 in the local coordinates of frame2.

Parameters
Returns

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

Examples

>>> from compas.geometry import Point
>>> frame1 = Frame([1, 1, 1], [0.68, 0.68, 0.27], [-0.67, 0.73, -0.15])
>>> frame2 = Frame([2, 1, 3], [1., 0., 0.], [0., 1., 0.])
>>> p1 = Point(2, 2, 2) # point in frame1
>>> p2 = Frame.local_to_local_coordinates(frame1, frame2, p1) # point in frame2
>>> Frame.local_to_local_coordinates(frame2, frame1, p2)
Point(2.000, 2.000, 2.000)