Skip to main content

box_plane_intersect

Function box_plane_intersect 

Source
pub fn box_plane_intersect(
    bounds: (Vec3, Vec3),
    plane_norm: Vec3,
    plane_pt: Vec3,
) -> Vec<Vec3>
Expand description

Ordered contour polygon where the plane (plane_norm, plane_pt) cuts the axis-aligned box bounds = (lo, hi). Port of silx boxPlaneIntersect.

Returns an empty vector when the plane misses the box (≤ 2 crossings); 3 points as-is; > 3 points ordered around their centroid (a convex polygon on the box faces). Vertices are de-duplicated within DEDUP_EPS.