Skip to main content

boolean

Function boolean 

Source
pub fn boolean(
    a: &Triangulation,
    b: &Triangulation,
    op: BoolKind,
) -> OgeomResult<MeshBoolean>
Expand description

The boolean op of two closed meshes.

Each operand must be closed and 2-manifold: every edge has exactly two triangles running it opposite ways, and the triangles about each vertex form one fan. It must have no triangle whose corners are collinear, must not cross or touch itself, and must be wound so that its triangles face out of the solid it bounds, which may have cavities.

Every decision is exact; only the new vertices are rounded, see the module documentation.

ยงErrors

OgeomError::NullObject if an operand has no triangles. OgeomError::Range if a triangle names a vertex its mesh does not have, and OgeomError::Numeric if a corner is not finite. OgeomError::Construction if an operand is open, is not 2-manifold, has a degenerate triangle, crosses itself or is wound inside out, if the operands do not meet, or if the result would not be 2-manifold.