resqpy.grid_surface.find_first_intersection_of_trajectory_with_surface

resqpy.grid_surface.find_first_intersection_of_trajectory_with_surface(trajectory, surface, start=0, start_xyz=None, nudge=None, return_second=False)

Returns xyz and other info of the first intersection of well trajectory with surface.

Parameters
  • trajectory (well.Trajectory object) – the wellbore trajectory object(s) to find the intersection for

  • surface (surface.Surface object) – the triangulated surface with which to search for intersections

  • start (int, default 0) – an index into the trajectory knots to start the search from

  • start_xyz (triple float, optional) – if present, should lie on start segment and search starts from this point

  • nudge (float, optional) – if present and positive, starting xyz is nudged forward this distance along segment; if present and negative, starting xyz is nudged backward along segment

  • return_second (boolean, default False) – if True, a sextuplet is returned with the last 3 elements identifying the ‘runner up’ intersection in the same trajectory segment, or None, None, None if only one intersection found

Returns

a triplet if return_second is False; a sextuplet if return_second is True; the first triplet is – (numpy float array of shape (3,), int, int): being the (x, y, z) intersection point, and the trajectory segment number, and the triangle index of the first intersection point; or None, None, None if no intersection found; if return_second is True, the 4th, 5th & 6th return values are similar to the first three, conveying information about the second intersection of the same trajectory segment with the surface, or None, None, None if a no second intersection was found

Notes

interseections are found based on straight line segments between the trajectory control points, this will result in errors where there is significant curvature between neighbouring control points