Skip to main content

boolean_plan

Function boolean_plan 

Source
pub fn boolean_plan(
    a: &Mesh,
    bvh_a: &Bvh,
    b: &Mesh,
    bvh_b: &Bvh,
    xf: &Rigid,
    op: BooleanOp,
) -> Result<BooleanPlan>
Expand description

Plans the boolean op of A with B (B placed in A’s frame by xf): the result replaces A. Reads only; apply_boolean writes the plan.

bvh_a and bvh_b must be current for a and b (the plan queries them for segments, parity and closest points).

§Errors

  • OpsError::InvalidInput when an input is not closed, manifold, consistently wound or free of degenerate, duplicate and self-intersecting triangles, when a mapped tool position leaves f32 range, or when an intersection is too complex (colinearly overlapping segments that meet in no endpoint).
  • OpsError::Query or OpsError::Store from the queries and the temporary builds. Nothing is written: the plan owns every allocation.