Skip to content
Shapemetry

@huukhanhnguyen/types / model/nesting

model/nesting

Bar1D

Bar1D = { placements: { key: string; length: number; offset: number; }[]; used: number; }

Nesting vocabulary — the part specs / metadata a nester takes and the 1D bar-packing result. The option bundle itself carries live resolver hooks and stays in @huukhanhnguyen/model.

placements

placements: { key: string; length: number; offset: number; }[]

key

key: string

length

length: number

offset

offset: number

used

used: number


NestPartMeta

NestPartMeta = { grain?: "none" | "length" | "width"; section?: string; }

section (see linearPart.ts's LinearPartRef) is what routes a spec to the 1D bin-packer below instead of the 2D SvgNest path. Post VIEW-REFACTOR this metadata arrives as ordinary component parameters, read by Model._partMetaOf (the convention block in Model.ts).

grain?

optional grain?: "none" | "length" | "width"

section?

optional section?: string


NestPartSpec

NestPartSpec = { key: string; quantity: number; }

key

key: string

quantity

quantity: number

Last updated: 📖 1 min readEdit on GitHub