Skip to main content

boolean_2d

Function boolean_2d 

Source
pub fn boolean_2d(
    subject: &[Ring2D],
    clip: &[Ring2D],
    op: BooleanOp2D,
) -> ContourSet
Expand description

Apply a boolean operation to two contour sets.

Ring winding carries outer-vs-hole (see the module docs); the fill rule is always NonZero. Never panics: degenerate rings are dropped and every empty combination has a defined answer —

subjectclipuniondifferenceintersection
emptyanyclipemptyempty
anyemptysubjsubjempty

where “clip”/“subj” mean that operand resolved into disjoint shapes.