Skip to main content

polygon_boolean

Function polygon_boolean 

Source
pub fn polygon_boolean(
    a: &[Point2],
    b: &[Point2],
    op: BooleanOp,
    tol: f64,
) -> PolygonBooleanResult
Expand description

General boolean of two simple polygons.

Orientation of the inputs is normalized internally (either winding is accepted). For BooleanOp::Difference the operation is A \ B.

Returns an empty PolygonBooleanResult if an input is degenerate or the arrangement could not be traced into closed loops; it never panics and never returns a silently-wrong partial result.