subtract_rect_openings

Function subtract_rect_openings 

Source
pub fn subtract_rect_openings(
    host: &Mesh,
    openings: &[([f64; 3], [f64; 3])],
    stats: &mut RectFastStats,
) -> Option<Mesh>
Expand description

Result of the cut: a watertight Mesh, or None to defer to the exact kernel. openings are world AABBs (min,max) of axis-aligned rectangular cutters. Handles WINDOWS, DOORS (flush to an edge), recesses, and overlapping openings uniformly via a 3D CELLULAR decomposition: split the host box by every opening plane on all three axes, mark each cell solid (in the host, outside every opening) or void, and emit each cell face that borders a void cell or the grid boundary. Watertight by construction — adjacent cells share snapped grid vertices bit-identically, so no T-junctions and no cracks.