API referenceEngine
panelize
Import from bear/engine/panelize.
Interfaces
PanelizeOptions
Defined in: bear/engine/panelize.ts:54
Configures the panel dimensions, gap, and orientation.
Properties
| Property | Type | Description |
|---|---|---|
gap? | Measurement | Gap between panels. Defaults to 1/8in. |
orientation? | "auto" | "vertical" | "horizontal" | Panel orientation relative to the surface. - "auto" (default): long edge runs along the surface's longer dimension. - "vertical": long edge runs along the surface's V (height) axis. - "horizontal": long edge runs along the surface's U (width) axis. |
overlap? | Measurement | Overlap between adjacent courses in the cross direction. Only used by the "overlapping" strategy. Each course overlaps the one below it by this amount (e.g. shingle headlap). |
overlapStagger? | number | Stagger fraction for the "overlapping" strategy (0–1). Controls how much odd rows are offset along the primary axis. Defaults to 1/6 (~6in on a 36in shingle). |
panelLength? | number | Panel long edge in project units. Defaults to 8ft. |
panelWidth? | number | Panel short edge in project units. Defaults to 4ft. |
PanelPlacement
Defined in: bear/engine/panelize.ts:21
A panel placement in surface-local corner-based coordinates.
Properties
SurfaceOptions
Defined in: bear/engine/panelize.ts:44
Describes the rectangular surface to be panelized.
Properties
| Property | Type | Description |
|---|---|---|
height | number | Surface height in project units (V axis). |
strategy? | PanelStrategy | Layout strategy. Defaults to "staggered". |
width | number | Surface width in project units (U axis). |
Type Aliases
PanelStrategy
type PanelStrategy = "scaled" | "staggered" | "edgeAligned" | "overlapping";Defined in: bear/engine/panelize.ts:37
Functions
panelize()
function panelize(surface, options?): PanelPlacement[];Defined in: bear/engine/panelize.ts:89
Compute panel placements to tile a rectangular surface.
Parameters
| Parameter | Type | Description |
|---|---|---|
surface | SurfaceOptions | Surface dimensions and layout strategy. |
options? | PanelizeOptions | Panel dimensions, gap, and orientation. |
Returns
Array of panel placements in corner-based coordinates.