intersection_line_triangle
- compas.geometry.intersection_line_triangle(line, triangle, tol=None)[source]
Computes the intersection point of a line (ray) and a triangle based on the Moeller Trumbore intersection algorithm
- Parameters:
- line[point, point] |
compas.geometry.Line
Two points defining the line.
- triangle[point, point, point]
XYZ coordinates of the triangle corners.
- tolfloat, optional
Tolerance value for computing the intersection between the line and the plane of the triangle. Default is
TOL.absolute
.
- line[point, point] |
- Returns:
- [float, float, float] | None
The intersection point between the line and the triangle, or None if the line and the plane are parallel.