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
| Property | Type | Description | Inherited 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? | string | Name for the truss assembly. Defaults to the blueprint name. | - |
pitch | string | Roof pitch in rise:run format (e.g. "6:12"). | - |
sheathing? | Factory | null | Factory producing roof sheathing elements. Pass null to skip. | TrussLayoutOptions.sheathing |
sheathingLayout? | PanelStrategy | Panel layout strategy for sheathing. Defaults to "staggered". | TrussLayoutOptions.sheathingLayout |
sheathingPanelOptions? | PanelizeOptions | Panel dimension overrides for sheathing. | TrussLayoutOptions.sheathingPanelOptions |
spacing? | Measurement | Truss spacing. Defaults to 24" OC. | - |
transform? | TransformMatrix | Pose 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
| Property | Type |
|---|---|
halfWidth | number |
label | string |
leftEave | Vector3 |
peak | Vector3 |
rightEave | Vector3 |
rise | number |
y | number |
TrussLayoutOptions
Defined in: bear/blueprints/truss-layout.tsx:145
Placement and layers shared by gable and scissor trusses.
Extended by
Properties
| Property | Type | Description |
|---|---|---|
children? | | BearElement<object> | BearElement<object>[] | - |
sheathing? | Factory | null | Factory producing roof sheathing elements. Pass null to skip. |
sheathingLayout? | PanelStrategy | Panel layout strategy for sheathing. Defaults to "staggered". |
sheathingPanelOptions? | PanelizeOptions | Panel dimension overrides for sheathing. |
transform? | TransformMatrix | Pose 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
| Parameter | Type |
|---|---|
from | Vector3 |
to | Vector3 |
Returns
object
| Name | Type |
|---|---|
length | number |
transform | TransformMatrix |
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
| Parameter | Type |
|---|---|
footprintWidth | number |
footprintDepth | number |
rise | number |
Returns
object
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
| Parameter | Type |
|---|---|
tcEave | Vector3 |
tcPeak | Vector3 |
bcEave | Vector3 |
bcCenter | Vector3 |
y | number |
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
| Parameter | Type |
|---|---|
name | string |
footprint | [Measurement, Measurement] |
pitch | string |
spacingM | Measurement |
buildTruss | (geo) => BearElement |
options? | TrussLayoutOptions |