def to_local(self, xyz): """ calculates local coordinates for points in parent CS/ :param xyz: coordinates in parent (global) coordinate system. """ xyz_offset = check_points_array(xyz) - self.origin return self._rotation.reciprocal().rotate(xyz_offset)
def to_parent(self, xyz): """ calculates coordinates of given points in parent (global) CS :param xyz: local coordinates array """ xyz = check_points_array(xyz) return self._rotation.rotate(xyz) + self.origin