Skip to main content

boolean

Function boolean 

Source
pub fn boolean(
    a: &ManifoldImpl,
    b: &ManifoldImpl,
    op: OpType,
    token: Option<&CancelToken>,
) -> ManifoldImpl
Expand description

Robust boolean of two impls (manifold or soup). Same observable contract as boolean3::boolean_with_token, computed by the Barki 2015 pipeline: intersect exactly, arrange + retriangulate, classify pieces into union/intersection sets by exact winding numbers, assemble the requested one.

Subtract uses the identity P − Q = P ∩ Q^c: Q’s winding is flipped on the working copy and the intersection set is assembled; the winding queries interpret the flipped operand as its (unbounded) complement.