- resqpy.olio.intersection.line_set_triangles_intersects(line_ps, line_vs, triangles, line_segment=False)¶
Find the intersections of each of set of lines within each of a set of triangles in 3D space.
line_ps ((c, 3) numpy array) – a point on each of c lines
line_vs ((c, 3) numpy array) – vectors being the direction of each of the c lines (or 1 common vector)
triangles ((n, 3, 3) numpy array) – three corners of each of the n triangles (final index is xyz)
line_segment (boolean, default False) – if True, each line is treated as a finite segment between p and p + v, and only intersections within the segment are included
points ((c, n, 3) numpy array) of intersections of the lines within the triangles, (nan, nan, nan) where a line is parallel to plane of triangle or intersection with the plane is outside the triangle
this function is computationally and memory intensive; it could benefit from parallelisation