Skip to main content

hatch

Function hatch 

Source
pub fn hatch(
    outline: &[Vec<Point2>],
    spacing: f64,
    angle: f64,
) -> Vec<(Point2, Point2)>
Expand description

Hatch the section outline: parallel lines at angle, spacing apart, clipped to the material by the even-odd rule.

The outline loops are taken as SectionView::outline hands them over (outer loops and holes together), so a hole interrupts the hatching exactly as it interrupts the material. Each returned pair is one hatch stroke in the plane’s (x, y).