wall-joins
Import from bear/blueprints/wall-joins.
How a wall's end meets another wall: Revit's wall joins, reduced to one rule.
A wall's section is three bands: its exterior layers, its core (the framing) and its interior layers. At a joined end each band ends on a plane of the other wall, so a join is only a table of which plane:
butt the band stops at the near face of the other wall's same band through it runs on to that band's far face miter each of its faces meets the other wall's same face tee it stops at the face of the wall it runs into, and its core at that wall's core (cutting the finish it passes through)
Every combination is two ends added together, not a case of its own. An
L corner is butt on one wall and through on the other, or miter on
both. A tee is one end; the wall it meets declares nothing. A band can
override its wall's choice (siding that wraps a butted corner is
butt(n, { ext: "through" }) against through(e, { ext: "butt" })), and
the rule holds for any layer stack, either side, and any angle, because
it names faces rather than distances.
A join is where two walls' location lines meet, as in Revit: the end's
anchor lies on the other wall's location plane, so a join places the
end as well as shaping it. An end left open by its other constraints is
placed by the join; an end placed some other way is checked against it.
Revit finds joins where lines happen to meet; Bear joins only what an
end declares, so an undeclared end stays square where it was placed.
import { butt, tee, through } from "bear/blueprints/wall-joins";
// An outside corner: south runs through, east butts into it. East
// needs no `from`: its join places its start.
<Wall name="south" along="@1" from="@A" to="@B" endJoin={through("east")} />
<Wall name="east" along="@B" to="@2" startJoin={butt("south")} />
// A partition between them: a tee at each end, and a dim for its line.
<Wall name="hall" direction="y" startJoin={tee("south")} endJoin={tee("north")} />Interfaces
CornerWallJoin
Defined in: bear/blueprints/wall-joins.ts:87
An L corner: each band butts, runs through, or miters.
Extends
JoinBase
Properties
| Property | Type | Description | Inherited from |
|---|---|---|---|
bands | Readonly<Record<WallBand, CornerJoin>> | - | - |
side | WallSide | The side of wall this wall stands on. At a corner both walls' sides face each other: "int" for an outside corner of a building, "ext" for an inside one. | JoinBase.side |
type | "corner" | - | - |
wall | RelationTarget | The wall this end meets: its element, or its name. | JoinBase.wall |
TeeWallJoin
Defined in: bear/blueprints/wall-joins.ts:93
A tee: this end runs into the side of a wall that carries on past it.
Extends
JoinBase
Properties
| Property | Type | Description | Inherited from |
|---|---|---|---|
side | WallSide | The side of wall this wall stands on. At a corner both walls' sides face each other: "int" for an outside corner of a building, "ext" for an inside one. | JoinBase.side |
type | "tee" | - | - |
wall | RelationTarget | The wall this end meets: its element, or its name. | JoinBase.wall |
Type Aliases
CornerJoin
type CornerJoin = "butt" | "through" | "miter";Defined in: bear/blueprints/wall-joins.ts:73
How one band meets the other wall's same band at an L corner.
CornerOptions
type CornerOptions = object & Partial<Record<WallBand, CornerJoin>>;Defined in: bear/blueprints/wall-joins.ts:101
Options for a corner: the side, and per-band overrides.
Type Declaration
| Name | Type |
|---|---|
side? | WallSide |
WallBand
type WallBand = "ext" | "core" | "int";Defined in: bear/blueprints/wall-joins.ts:67
A band of a wall's section: the layers outside the core, the core, the layers inside.
WallFace
type WallFace = "finishExt" | "coreExt" | "coreInt" | "finishInt";Defined in: bear/blueprints/wall-joins.ts:64
The four faces every wall publishes, from its exterior to its interior.
WallJoin
type WallJoin = CornerWallJoin | TeeWallJoin;Defined in: bear/blueprints/wall-joins.ts:98
How one end of a wall meets another wall.
WallSide
type WallSide = "int" | "ext";Defined in: bear/blueprints/wall-joins.ts:70
One side of a wall.
Variables
BAND_FACES
const BAND_FACES: Readonly<Record<WallBand, [WallFace, WallFace]>>;Defined in: bear/blueprints/wall-joins.ts:151
Each band's two faces, exterior first: the lines it runs between.
joins
const joins: RelationTargetFactory<"joins">;Defined in: bear/blueprints/wall-joins.ts:233
"My end meets you": a wall's end at a corner or a tee. The edge carries
how (at, type, side); the end lands on the other wall's
location, and each of the wall's layers on the face its join names.
Functions
butt()
function butt(wall, options?): CornerWallJoin;Defined in: bear/blueprints/wall-joins.ts:119
This end stops against wall, which runs through the corner.
Parameters
| Parameter | Type |
|---|---|
wall | RelationTarget |
options? | CornerOptions |
Returns
joinFaces()
function joinFaces(join, band): [WallFace, WallFace];Defined in: bear/blueprints/wall-joins.ts:166
The faces of the other wall that a band of this one ends on, one for
each of the band's lines (BAND_FACES order).
Parameters
Returns
lowerJoins()
function lowerJoins(p, c): void;Defined in: bear/blueprints/wall-joins.ts:243
A wall's joins, lowered: each joined end is one declaration, the edge and the end's anchor on the other wall's location line together.
Parameters
| Parameter | Type |
|---|---|
p | { endJoin?: WallJoin; startJoin?: WallJoin; } |
p.endJoin? | WallJoin |
p.startJoin? | WallJoin |
c | Lowerer |
Returns
void
miter()
function miter(wall, options?): CornerWallJoin;Defined in: bear/blueprints/wall-joins.ts:135
This end and wall's meet face to face, on the corner's diagonal.
Parameters
| Parameter | Type |
|---|---|
wall | RelationTarget |
options? | CornerOptions |
Returns
tee()
function tee(wall, __namedParameters?): TeeWallJoin;Defined in: bear/blueprints/wall-joins.ts:143
This end runs into the side face of wall, which carries on past it.
Parameters
| Parameter | Type |
|---|---|
wall | RelationTarget |
__namedParameters? | { side?: WallSide; } |
__namedParameters.side? | WallSide |
Returns
teeNotchFaces()
function teeNotchFaces(join): [WallFace, WallFace];Defined in: bear/blueprints/wall-joins.ts:189
Where a tee's core passes through the other wall's finish: between that wall's finish and core faces on the side this wall stands on.
Parameters
| Parameter | Type |
|---|---|
join | TeeWallJoin |
Returns
through()
function through(wall, options?): CornerWallJoin;Defined in: bear/blueprints/wall-joins.ts:127
This end runs through the corner, past the end of wall, which butts into it.
Parameters
| Parameter | Type |
|---|---|
wall | RelationTarget |
options? | CornerOptions |