Skip to Content
Bear documentation
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;
}
NameTypeDescription
footprintPoint[]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;
}
NameTypeDescription
footprint?never-
lengthMeasurementRoof span length (X axis, the slope direction), centered at x = 0.
widthMeasurementRoof width (Y axis, perpendicular to slope), centered at y = 0.

RoofProps

type RoofProps = RoofPlan & object;

Defined in: bear/blueprints/Roof.tsx:50

Type Declaration

NameTypeDescription
children?| BearElement | BearElement[]-
elevation?MeasurementZ position of the rafter bottoms at the low edge of the roof.
name?stringName for this roof in the tree. Defaults to "R".
onCenter?MeasurementRafter spacing. Defaults to 16" OC.
pitch?stringRoof pitch in rise:run format (e.g. "6:12"). Defaults to "6:12".
rafterSize?RafterSizeNominal lumber size for rafters. Defaults to "2x8".
sheathing?Factory | nullFactory producing roof sheathing elements. Defaults to 1/2" OSB. Pass null to skip.
sheathingLayout?PanelStrategyPanel layout strategy for sheathing. Defaults to "staggered".
sheathingPanelOptions?PanelizeOptionsPanel dimension overrides for sheathing.
transform?TransformMatrixOptional 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):

  1. RafterFraming — structural rafters along the slope
  2. 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

ParameterType
__namedParametersRoofProps

Returns

BearElement

On this page