subtract_multiple_2d_counted

Function subtract_multiple_2d_counted 

Source
pub fn subtract_multiple_2d_counted(
    profile: &Profile2D,
    void_contours: &[Vec<Point2<f64>>],
) -> Result<(Profile2D, usize)>
Expand description

Like subtract_multiple_2d, but also reports how many DISCONNECTED output shapes the difference produced (each with non-degenerate area). The returned Profile2D is the largest shape (as subtract_multiple_2d); a caller that must not silently drop geometry — the 2D opening-subtraction re-extrude — checks shapes == 1 and otherwise defers to the exact kernel (a void that splits the profile into pieces can’t be re-extruded from a single profile).