Skip to content
Shapemetry

@huukhanhnguyen/model / schema/domains/hatch

schema/domains/hatch

HatchFamily

HatchFamily = { base: Point2d; cycle?: number[]; direction: Point2d; normal: Point2d; shift: number; spacing: number; }

One line family resolved against its hatch's own placement: scale applied to every length, angle folded in, origin moved to the hatch anchor.

base

base: Point2d

Anchor of line 0.

cycle?

optional cycle?: number[]

Absent = a solid, unbroken line.

direction

direction: Point2d

Unit direction of the lines.

normal

normal: Point2d

Unit normal — the direction spacing steps in.

shift

shift: number

spacing

spacing: number


HatchMarks

HatchMarks = { edges: CurveEdge[]; points: PointEntity[]; }

What one hatch expands to. The two kinds of mark are not the same thing: a drawn length is a chain, a zero-length draw is a dot.

edges

edges: CurveEdge[]

Drawn lengths, one chain each.

points

points: PointEntity[]

Dots — every zero-length draw the pen cycle asked for.

Last updated: 📖 1 min readEdit on GitHub