Skip to content

Commit

Permalink
changed typing for translation unit
Browse files Browse the repository at this point in the history
  • Loading branch information
mbwinkler committed Nov 6, 2024
1 parent 8d60423 commit cbde204
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions weldx/transformations/cs_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from weldx.exceptions import WeldxDeprecationWarning, WeldxException
from weldx.geometry import SpatialData
from weldx.time import Time, types_time_like, types_timestamp_like
from weldx.types import QuantityLike
from weldx.types import UnitLike
from weldx.util import check_matplotlib_available, dataclass_nested_eq

from .local_cs import LocalCoordinateSystem
Expand Down Expand Up @@ -836,7 +836,7 @@ def create_cs_from_homogenous_transformation(
coordinate_system_name: str,
reference_system_name: str,
transformation_matrix: types_homogeneous,
translation_unit: QuantityLike,
translation_unit: UnitLike,
time: types_time_like = None,
time_ref: types_timestamp_like = None,
lcs_child_in_parent: bool = True,
Expand Down
8 changes: 4 additions & 4 deletions weldx/transformations/local_cs.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
types_orientation,
)
from weldx.transformations.util import normalize
from weldx.types import QuantityLike
from weldx.types import UnitLike

__all__ = ("LocalCoordinateSystem",)

Expand Down Expand Up @@ -549,7 +549,7 @@ def from_axis_vectors(
def from_homogeneous_transformation(
cls,
transformation_matrix: types_homogeneous,
translation_unit: QuantityLike,
translation_unit: UnitLike,
time: types_time_like = None,
time_ref: types_timestamp_like = None,
) -> LocalCoordinateSystem:
Expand Down Expand Up @@ -736,13 +736,13 @@ def as_rotation(self) -> Rot: # pragma: no cover
"""
return Rot.from_matrix(self.orientation.values)

def as_homogeneous_matrix(self, translation_unit: QuantityLike) -> np.ndarray:
def as_homogeneous_matrix(self, translation_unit: UnitLike) -> np.ndarray:
"""Get a homogeneous transformation matrix from the coordinate system
orientation.
Parameters
----------
translation_unit : QuantityLike
translation_unit : UnitLike
Unit the translation part of the homogeneous transformation matrix
should represent.
Expand Down

0 comments on commit cbde204

Please sign in to comment.