is_intersection_line_triangle
-
compas.geometry.is_intersection_line_triangle(line, triangle, tol=1e-06)[source] Verifies if a line (ray) intersects with a triangle.
- Parameters
line ([point, point] or
compas.geometry.Line) – A line.triangle ([point, point, point]) – A triangle.
tol (float, optional) – A tolerance for intersection verification. Default is
1e-6.
- Returns
bool –
Trueif the line (ray) intersects with the triangle.Falseotherwise.
Notes
Based on the Moeller Trumbore intersection algorithm. The line is treated as continues, directed ray and not as line segment with a start and end point
Examples
>>>