resqpy.olio.simple_lines.drape_lines_to_rods
- resqpy.olio.simple_lines.drape_lines_to_rods(line_list, rod_list_list, projection, grid, axis, ref_slice0=0, plus_face=False, offset=-1.0, snap=False)[source]
Roughly drapes lines near grid cross section; draped lines are suitable for 3D visualisation.
- Parameters:
line_list (
listofnumpy arraysoffloats) – the undraped poly-linesrod_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 slicingref_slice0 (
integer, default0) – the reference slice in the grid to drape to; zero basedplus_face (
boolean, defaultFalse) – which face of the reference slice to useoffset (
float, default-1.0) – the horzontal offset to add to the y or x value of rod pointssnap (
boolean, defaultFalse) – 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