draw.Drawing.hatch
draw.Drawing: D = hatch (D, R)
draw.Drawing: D = hatch (D, R, PATTERN)
draw.Drawing: D = hatch (D, R, PATTERN, ANGLE, SPACING)
Append a hatched region.
D = hatch (D, R) fills the geom.Region
R with a hatch pattern, its holes left clear. The region may
have arcs and splines; a polygon is made into one with
geom.Region (P):
R = geom.Region ([0, 0; 60, 0; 60, 40; 0, 40], ...
{[20, 20, 1; 40, 20, 1]});
D = draw.Drawing ().hatch (R);
|
PATTERN names the fill and defaults to 'ANSI31', the
45-degree hatch that means cut material; geom.hatchlines ()
lists the names. ANGLE rotates the pattern, in degrees, and
SPACING sets the line spacing in millimetres; the two are given
together.
A drawing is flat, so R must lie in its xy plane. Its
geom.UCS may have its own origin and x axis there and may
face down: the drawing keeps the same region, re-expressed in its own
coordinates.
See also: draw.Drawing.region, geom.Region, geom.hatchlines
Source Code: draw.Drawing