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
frame1 (
compas.geometry.Frame
) – A frame representing one local coordinate system.frame2 (
compas.geometry.Frame
) – A frame representing another local coordinate system.object_in_frame1 (
compas.geometry.Point
orcompas.geometry.Vector
orcompas.geometry.Frame
or list of float) – An object in the coordinate frame1. If you pass a list of float, it is assumed to represent a point.
- Returns
compas.geometry.Point
orcompas.geometry.Vector
orcompas.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)