def drape_lines_to_rods(line_list,
                        rod_list_list,
                        projection,
                        grid,
                        axis,
                        ref_slice0 = 0,
                        plus_face = False,
                        offset = -1.0,
                        snap = False):
    """Roughly drapes lines near grid cross section; draped lines are suitable for 3D visualisation.

    arguments:
       line_list (list of numpy arrays of floats): the undraped poly-lines
       rod_list_list: (list of arrays of pairs of integers): as returned by nearest_rods()
       grid: (grid.Grid object): the grid to which the poly-lines are to be draped
       axis (string): 'I' or 'J' being the axis removed during slicing
       ref_slice0 (integer, default 0): the reference slice in the grid to drape to; zero based
       plus_face (boolean, default False): which face of the reference slice to use
       offset (float, default -1.0): the horzontal offset to add to the y or x value of rod points
       snap (boolean, default False): if True, the x & z or y & z values of each vertex in the lines
          are moved to match the rod point; if False, only the y or x values are adjusted

    returns:
       list of numpy arrays of floats, being the draped equivalents of the line_list

    notes:
       the units of the line list must implicitly be those of the crs for the grid;
       currently limited to unsplit grids with no k gaps;
       the results of this function are intended for 3D visualisation of an indicative nature;
       resulting draped lines may penetrate the grid layer faces depending on the 3D geometry and
       the spacing of the vertices compared to cell sizes
    """

    assert projection in ['xz', 'yz']
    assert axis.upper() in ['I', 'J']
    assert len(line_list) == len(rod_list_list)

    x_sect = grid.unsplit_x_section_points(axis, ref_slice0 = ref_slice0, plus_face = plus_face)

    draped_list = []
    for line, rod_list in zip(line_list, rod_list_list):
        drape = line.copy()
        p_count = line.shape[0]
        for p in range(p_count):
            kj_or_ki = rod_list[p]
            if snap:
                drape[p, :] = x_sect[tuple(kj_or_ki)]
            elif projection == 'xz':
                drape[p, 1] = x_sect[tuple(kj_or_ki)][1]
            else:
                drape[p, 0] = x_sect[tuple(kj_or_ki)][0]
        if projection == 'xz':
            drape[:, 1] += offset
        else:
            drape[:, 0] += offset
        draped_list.append(drape)

    return draped_list