mymesh.rays.PlaneTrianglesIntersection#
- mymesh.rays.PlaneTrianglesIntersection(pt, Normal, Tris, eps=1e-14)[source]#
Vectorized intersection test for detecting intersections between a plane and a set of triangles.
An intersection will be detected if points are on different sides of the plane, or if any points lie exactly on the plane. That are a distance +/- eps from the plane will be considered as on the plane.
- Parameters:
pt (array_like) – 3 element array, point on plane
Normal (array_like) – 3 element array, normal vector to plane
Tris (array_like) – Coordinates of triangle vertices for each triangle in the format np.array([[[a, b, c], [d, e, f], [g, h, i]], [[…],[…],[…]], …). Should have shape (n,3,3) for n triangles.
eps (float, optional) – Small parameter used to determine if a value is sufficiently close to 0, by default 1e-14
- Returns:
intersections – Array of bools for each triangle, True of there is an intersection, otherwise False.
- Return type:
np.ndarray