Skip to main content

combine_blocks_mixed_pairs

Function combine_blocks_mixed_pairs 

Source
pub fn combine_blocks_mixed_pairs(
    blocks: &[Block],
    tol: Float,
    max_tries: usize,
) -> CombinedBlocks
Expand description

Attempt to merge as many blocks as possible from an initial set.

Starting from the provided block list (typically ≤ 8 items), this makes repeated passes trying to merge any pair whose faces match. The search is greedy, mirroring the original Python helper: once a pair is merged it is replaced by the new block and the pass restarts until no further reductions occur or max_tries is hit.