def translation(self): """Returns the 3 values of translation from the ``Transformation``. """ return translation_from_matrix(self.matrix)
def translation_vector(self): from compas.geometry import Vector vector = translation_from_matrix(self.matrix) return Vector(*vector)
def test_translation_from_matrix(): t = [1, 2, 3] T = matrix_from_translation(t) assert translation_from_matrix(T) == t