def axis_angle_vector(self): """:class:`compas.geometry.Vector` : The axis-angle vector representing the rotation of the frame.""" R = matrix_from_basis_vectors(self.xaxis, self.yaxis) return Vector(*axis_angle_vector_from_matrix(R))
def axis_angle_vector(self): R = matrix_from_basis_vectors(self.xaxis, self.yaxis) return Vector(*axis_angle_vector_from_matrix(R))
def test_axis_angle_vector_from_matrix(): aav1 = [-0.043, -0.254, 0.617] R = matrix_from_axis_angle_vector(aav1) aav2 = axis_angle_vector_from_matrix(R) assert allclose(aav1, aav2)
def axis_angle_vector_from_plane_to_plane(plane_to, plane_from=rg.Plane.WorldXY): T = rg.Transform.PlaneToPlane(plane_from, plane_to) M = rgtransform_to_matrix(T) return cg.axis_angle_vector_from_matrix(M)