resqpy.grid_surface.find_intersections_of_trajectory_with_surface(trajectory, surface)

Returns an array of triangle indices and an array of xyz of intersections of well trajectory with surface.

  • trajectory (well.Trajectory object; or list thereof) – the wellbore trajectory object(s) to find the intersections for; if a list of trajectories is provided then the return value is a corresponding list

  • surface (surface.Surface object) – the triangulated surface with which to intersect the trajectory


(numpy int array of shape (N,), numpy float array of shape (N, 3)) – the first array is a list of surface triangle indices containing an intersection and the second array is the corresponding list of (x, y, z) intersection points; if the trajectory argument is a list of trajectories, then a correponding list of numpy array pairs is returned


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; a given triangle index might appear more than once in the first returned array