API referenceBlueprints
Roof
Import from bear/blueprints/Roof.
Type Aliases
RoofPlan
type RoofPlan =
| {
footprint: Point[];
length?: never;
width?: never;
}
| {
footprint?: never;
length: Measurement;
width: Measurement;
};Defined in: bear/blueprints/Roof.tsx:32
Where the roof's plan sits: a footprint in the parent frame, or a size centered at (0, 0).
Union Members
Type Literal
{
footprint: Point[];
length?: never;
width?: never;
}| Name | Type | Description |
|---|---|---|
footprint | Point[] | Axis-aligned rectangle (4 corners) in the parent frame. Supports @-references. Rotates about its center. |
length? | never | - |
width? | never | - |
Type Literal
{
footprint?: never;
length: Measurement;
width: Measurement;
}| Name | Type | Description |
|---|---|---|
footprint? | never | - |
length | Measurement | Roof span length (X axis, the slope direction), centered at x = 0. |
width | Measurement | Roof width (Y axis, perpendicular to slope), centered at y = 0. |
RoofProps
type RoofProps = RoofPlan & object;Defined in: bear/blueprints/Roof.tsx:50
Type Declaration
| Name | Type | Description |
|---|---|---|
children? | | BearElement | BearElement[] | - |
elevation? | Measurement | Z position of the rafter bottoms at the low edge of the roof. |
name? | string | Name for this roof in the tree. Defaults to "R". |
onCenter? | Measurement | Rafter spacing. Defaults to 16" OC. |
pitch? | string | Roof pitch in rise:run format (e.g. "6:12"). Defaults to "6:12". |
rafterSize? | RafterSize | Nominal lumber size for rafters. Defaults to "2x8". |
sheathing? | Factory | null | Factory producing roof sheathing elements. Defaults to 1/2" OSB. Pass null to skip. |
sheathingLayout? | PanelStrategy | Panel layout strategy for sheathing. Defaults to "staggered". |
sheathingPanelOptions? | PanelizeOptions | Panel dimension overrides for sheathing. |
transform? | TransformMatrix | Optional transform. Composed with auto-computed position. |
Functions
Roof()
function Roof(__namedParameters): BearElement;Defined in: bear/blueprints/Roof.tsx:112
Roof — layered assembly for roof construction (shed roof).
Layers (bottom to top):
- RafterFraming — structural rafters along the slope
- Roof sheathing — sheet good on the top face of the rafters
The roof is positioned so the low edge of the rafter bottoms
sits at the given elevation. The roof slopes upward from -X to +X.
A footprint places the plan in the parent frame, resolving grid
references against the enclosing Building; length/width center it at (0, 0).
Parameters
| Parameter | Type |
|---|---|
__namedParameters | RoofProps |