Skip to Content
Bear documentation
API referenceBlueprints

truss-layout

Import from bear/blueprints/truss-layout.

Interfaces

TrussesProps

Defined in: bear/blueprints/truss-layout.tsx:157

Placement and layers shared by gable and scissor trusses.

Extends

Extended by

Properties

PropertyTypeDescriptionInherited from
children?| BearElement<object> | BearElement<object>[]-TrussLayoutOptions.children
footprint[Measurement, Measurement]Width (X) and depth (Y), centered at (0, 0). Ridge at x = 0; eaves at z = 0.-
name?stringName for the truss assembly. Defaults to the blueprint name.-
pitchstringRoof pitch in rise:run format (e.g. "6:12").-
sheathing?Factory | nullFactory producing roof sheathing elements. Pass null to skip.TrussLayoutOptions.sheathing
sheathingLayout?PanelStrategyPanel layout strategy for sheathing. Defaults to "staggered".TrussLayoutOptions.sheathingLayout
sheathingPanelOptions?PanelizeOptionsPanel dimension overrides for sheathing.TrussLayoutOptions.sheathingPanelOptions
spacing?MeasurementTruss spacing. Defaults to 24" OC.-
transform?TransformMatrixPose in the parent frame. The origin is the plan center at eave elevation.TrussLayoutOptions.transform

TrussGeometry

Defined in: bear/blueprints/truss-layout.tsx:134

Parameters passed to the per-truss builder callback.

Properties

PropertyType
halfWidthnumber
labelstring
leftEaveVector3
peakVector3
rightEaveVector3
risenumber
ynumber

TrussLayoutOptions

Defined in: bear/blueprints/truss-layout.tsx:145

Placement and layers shared by gable and scissor trusses.

Extended by

Properties

PropertyTypeDescription
children?| BearElement<object> | BearElement<object>[]-
sheathing?Factory | nullFactory producing roof sheathing elements. Pass null to skip.
sheathingLayout?PanelStrategyPanel layout strategy for sheathing. Defaults to "staggered".
sheathingPanelOptions?PanelizeOptionsPanel dimension overrides for sheathing.
transform?TransformMatrixPose in the parent frame. The origin is the plan center at eave elevation.

Variables

TRUSS_HALF_WIDTH

const TRUSS_HALF_WIDTH: number;

Defined in: bear/blueprints/truss-layout.tsx:22

Functions

beamProps()

function beamProps(from, to): object;

Defined in: bear/blueprints/truss-layout.tsx:27

Compute transform and length for a beam between two 3D points.

Parameters

ParameterType
fromVector3
toVector3

Returns

object

NameType
lengthnumber
transformTransformMatrix

computeGableSurfaces()

function computeGableSurfaces(
   footprintWidth, 
   footprintDepth, 
   rise
): object;

Defined in: bear/blueprints/truss-layout.tsx:45

Compute gable roof surfaces (left and right slopes) for truss-based roofing.

Parameters

ParameterType
footprintWidthnumber
footprintDepthnumber
risenumber

Returns

object

NameType
leftSurface
rightSurface

halfWebs()

function halfWebs(
   tcEave, 
   tcPeak, 
   bcEave, 
   bcCenter, 
   y, 
   side
): object[];

Defined in: bear/blueprints/truss-layout.tsx:106

Generate Fink/W-pattern web members for one half of a truss.

Divides each chord into thirds and creates two diagonal webs that zigzag between top and bottom chord panel points — the classic "W" shape seen in metal-plate-connected engineered trusses.

Parameters

ParameterType
tcEaveVector3
tcPeakVector3
bcEaveVector3
bcCenterVector3
ynumber
side"R" | "L"

Returns

object[]


layoutTrusses()

function layoutTrusses(
   name, 
   footprint, 
   pitch, 
   spacingM, 
   buildTruss, 
   options?
): BearElement;

Defined in: bear/blueprints/truss-layout.tsx:177

Lay out trusses along the Y axis and wrap in an Assembly that publishes gable roof surfaces. The plan is centered at (0, 0), with the ridge at x = 0 and chord endpoints at eave elevation z = 0.

When sheathing is provided, creates sheathing layers on both gable faces and publishes the sheathing exterior as the left/right faces — so roofing can be layered on top via getRef(trusses, "left").

Parameters

ParameterType
namestring
footprint[Measurement, Measurement]
pitchstring
spacingMMeasurement
buildTruss(geo) => BearElement
options?TrussLayoutOptions

Returns

BearElement

On this page