mymesh.rays.TriangleTriangleIntersectionPt#
- mymesh.rays.TriangleTriangleIntersectionPt(Tri1, Tri2, eps=1e-14, edgeedge=False)[source]#
Intersection test for two triangles that returns the point(s) of intersection.
Möller, T. (1997). Fast triangle-triangle intersection test. Journal of Graphics Tools, 2(2), 25-30. https://doi.org/10.1080/10867651.1997.10487472 [Moller97]
- Parameters:
Tri1 (array_like) – Coordinates of the three vertices of the first triangle in the format
np.array([[a, b, c], [d, e, f], [g, h, i]])
Tri2 (array_like) – Coordinates of the three vertices of the second triangle in the format
np.array([[a, b, c], [d, e, f], [g, h, i]])
eps (float, optional) – Small parameter used to determine if a value is sufficiently close to 0, by default 1e-14
edgeedge (bool, optional) – If
edgeedge
is true, two triangles that meet exactly at the edges will be counted as an intersection, by default False. This inclues two adjacent triangles that share an edge, but also cases where two points of Tri1 lie exactly on the edges of Tri2.
- Returns:
points – Array of points where the two triangles intersect.
- Return type:
array_like