resqpy.olio.intersection.poly_line_triangles_intersects

resqpy.olio.intersection.poly_line_triangles_intersects(line_ps, triangles)[source]

Find the intersections of each segment of an open poly-line with each of a set of triangles in 3D space.

Parameters
  • line_ps ((c, 3) numpy array) – ordered points on each of c-1 segments of a poly-line

  • triangles ((n, 3, 3) numpy array) – three corners of each of the n triangles (final index is xyz)

Returns

points ((c-1, n, 3) numpy array) of intersections of the line segments within the triangles, (nan, nan, nan) where a line segment is parallel to plane of triangle or intersection of the segment with the plane is outside the triangle or beyond the ends of the segment

Note

this function is computationally and memory intensive; it could benefit from parallelisation