Skip to Content
Bear documentation
API referenceBlueprints

WallStrip

Import from bear/blueprints/WallStrip.

Interfaces

StripEnds

Defined in: bear/blueprints/WallStrip.tsx:22

A strip's solved ends: each a segment across it, one point per line.

Properties

PropertyType
endreadonly [Vec2, Vec2]
startreadonly [Vec2, Vec2]

WallStripProps

Defined in: bear/blueprints/WallStrip.tsx:27

Properties

PropertyTypeDescription
build(ends) => BearElementWhat fills the strip, from its solved ends.
endStripEnd-
ends?StripEndsCompleted by the engine from the solved anchors.
linesreadonly [number, number]The two lines the strip runs between, as local y in the wall's frame.
namestringThe name of what the strip builds, which is also its own.
startStripEnd-

Type Aliases

StripEnd

type StripEnd = 
  | {
  at: number;
}
  | {
  faces: readonly [string, string];
  meets: RelationTarget;
};

Defined in: bear/blueprints/WallStrip.tsx:17

One end of a strip: square at a point on the wall line, or landing on another element's faces, one face per line.

Variables

WallStrip

const WallStrip: AssemblyFn<WallStripProps> & object;

Defined in: bear/blueprints/WallStrip.tsx:72

WallStrip: a run of a wall between two lines along it (a layer, the framing, a cut), whose ends the solver places.

Each end is a segment across the strip, one anchor on each line, so an end that meets another wall at an angle comes back exactly. A square end pins its anchors and folds away, so a wall with no joins never touches the solver; an end that meets another wall lands each anchor on that wall's face. The solver carries the other wall's faces to this one across passes, which is what lets two walls at a corner each read the other whatever order they are written in.

The strip is transparent: the tree holds what build returns.

Type Declaration

NameType
refs?readonly string[]

Functions

endCuts()

function endCuts(
   name, 
   heightAt, 
   targets
): (ends) => BearElement;

Defined in: bear/blueprints/WallStrip.tsx:167

A strip's build that trims what its siblings built to stripSpan back to the angled cut lines at its ends.

Parameters

ParameterType
namestring
heightAt(x) => number
targetsreadonly BearElement<object>[]

Returns

(ends) => BearElement


notch()

function notch(
   name, 
   heightAt, 
   target
): (ends) => BearElement;

Defined in: bear/blueprints/WallStrip.tsx:187

A strip's build that cuts its whole outline out of target, up to this wall's own top and no further: the target may stand taller.

Parameters

ParameterType
namestring
heightAt(x) => number
targetRelationTarget

Returns

(ends) => BearElement


stripSpan()

function stripSpan(ends): [number, number];

Defined in: bear/blueprints/WallStrip.tsx:103

Where a strip runs along the wall: from its start's far point to its end's.

Parameters

ParameterType
endsStripEnds

Returns

[number, number]

On this page