weldx.transformations.LocalCoordinateSystem.from_axis_vectors#
- classmethod LocalCoordinateSystem.from_axis_vectors(x=None, y=None, z=None, coordinates=None, time=None, time_ref=None)#
Create a LCS from two or more coordinate axes.
If only two axes are provided, the third one is calculated under the assumption of a positively oriented coordinate system (right hand system).
- Parameters:
x (
Union
[DataArray
,_SupportsArray
[dtype
[Any
]],_NestedSequence
[_SupportsArray
[dtype
[Any
]]],bool
,int
,float
,complex
,str
,bytes
,_NestedSequence
[Union
[bool
,int
,float
,complex
,str
,bytes
]],Quantity
,None
]) – A vector representing the coordinate systems x-axisy (
Union
[DataArray
,_SupportsArray
[dtype
[Any
]],_NestedSequence
[_SupportsArray
[dtype
[Any
]]],bool
,int
,float
,complex
,str
,bytes
,_NestedSequence
[Union
[bool
,int
,float
,complex
,str
,bytes
]],Quantity
,None
]) – A vector representing the coordinate systems y-axisz (
Union
[DataArray
,_SupportsArray
[dtype
[Any
]],_NestedSequence
[_SupportsArray
[dtype
[Any
]]],bool
,int
,float
,complex
,str
,bytes
,_NestedSequence
[Union
[bool
,int
,float
,complex
,str
,bytes
]],Quantity
,None
]) – A vector representing the coordinate systems z-axiscoordinates (
Union
[DataArray
,_SupportsArray
[dtype
[Any
]],_NestedSequence
[_SupportsArray
[dtype
[Any
]]],bool
,int
,float
,complex
,str
,bytes
,_NestedSequence
[Union
[bool
,int
,float
,complex
,str
,bytes
]],Quantity
,None
]) – Coordinates of the origin (Default value = None)time (
Union
[DatetimeIndex
,datetime64
,list
[str
],Time
,TimedeltaIndex
,Quantity
,timedelta64
,Timestamp
,str
,TimeDependent
,None
]) – Time data for time dependent coordinate systems (Default value = None)time_ref (
Union
[Timestamp
,str
,Time
,None
]) – Optional reference timestamp iftime
is a time delta.
- Returns:
The new coordinate system
- Return type:
Examples
Create a coordinate system from 3 orthogonal vectors:
>>> from weldx import LocalCoordinateSystem >>> >>> x = [2, 2, 0] >>> y = [-8, 8, 0] >>> z = [0, 0, 3] >>> >>> lcs = LocalCoordinateSystem.from_axis_vectors(x, y, z)
Create a coordinate system from 2 orthogonal vectors and let the third one be determined automatically:
>>> lcs = LocalCoordinateSystem.from_axis_vectors(x=x, z=z)