distance3d.distance.plane_to_triangle¶
- distance3d.distance.plane_to_triangle(plane_point, plane_normal, triangle_points)[source]¶
Compute the shortest distance between a plane and a triangle.
- Parameters:
- plane_pointarray, shape (3,)
Point on the plane.
- plane_normalarray, shape (3,)
Normal of the plane. We assume unit length.
- triangle_pointsarray, shape (3, 3)
Each row contains a point of the triangle (A, B, C).
- Returns:
- distfloat
The shortest distance between triangle and plane.
- closest_point_planearray, shape (3,)
Closest point on plane.
- closest_point_trianglearray, shape (3,)
Closest point on triangle.