Skip to Content
Bear documentation
API referenceBlueprints

StudFraming

Import from bear/blueprints/StudFraming.

Interfaces

StudFramingProps

Defined in: bear/blueprints/StudFraming.tsx:33

Properties

PropertyTypeDescription
children?| BearElement<object> | BearElement<object>[]Hosted components declare excluded stud spans in authored order.
heightnumberWall height in project units.
isFlipped?booleanWhen true, swap ext/int face labels so "ext" faces the +Y direction.
lengthnumberWall length in project units, centered at x = 0.
onCenter?numberStud spacing in project units. Defaults to 16in (512 project units).
span?[number, number]Where the plates and studs run (local x). Defaults to the wall line, [-length/2, length/2]; a wall join moves an end.
studSize?WallStudSizeNominal lumber size for studs and plates. Defaults to "2x4".
topPitch?stringPitch of the top plate (e.g. "3:12"). Defaults to "0:12" (flat).
transform?TransformMatrixPose in the parent frame, about the wall's plan center at its base.

Functions

StudFraming()

function StudFraming(__namedParameters): BearElement;

Defined in: bear/blueprints/StudFraming.tsx:74

StudFraming — a wall's framing: continuous plates, the openings it was given, and the common studs between them.

Hosted descendants declare their excluded spans through FramedOpenings. The plates run the wall's full length; a door cuts the base plate out once the wall stands, which its Opening declares as a cuts edge. The studs are N+1 stud runs around N openings, each run a solvable span dimmed to the king planes of the openings beside it, so the framing never has to know where the solver put an opening.

Publishes ext/int face surfaces (see studFramingFaces) for downstream layers, and start/end planes the runs are dimmed from.

Parameters

ParameterType
__namedParametersStudFramingProps

Returns

BearElement


studFramingFaces()

function studFramingFaces(spec): object;

Defined in: bear/blueprints/StudFraming.tsx:258

The framing's exterior and interior faces in the framing's local frame. A pure function of what builds the framing, so a wall can size its layer stack before rendering anything. Openings are not here: a layer covers the whole face and the opening's Void cuts the hole afterward.

length and height are the wall line's, pitch the top plate's rise per unit run; span is where along that line the faces run (the whole line by default).

Parameters

ParameterType
spec{ height: number; isFlipped: boolean; length: number; pitch: number; span?: [number, number]; studSize: WallStudSize; }
spec.heightnumber
spec.isFlippedboolean
spec.lengthnumber
spec.pitchnumber
spec.span?[number, number]
spec.studSizeWallStudSize

Returns

object

NameType
extSurface
intSurface

On this page