dims
Import from bear/engine/dims.
Interfaces
DimChainProps
Defined in: bear/engine/dims.ts:83
Properties
| Property | Type | Description |
|---|---|---|
children? | | BearElement<object> | BearElement<object>[] | <Dim> links, each to-only; link N starts at link N-1's to. |
direction? | Axis | Axis shared by every link in the chain. Inferred when from is a gridline. |
from | DimEnd | The plane the first link starts from. |
name? | string | - |
priority? | DimPriority | Default priority for links that don't set their own. |
DimProps
Defined in: bear/engine/dims.ts:44
Properties
| Property | Type | Description |
|---|---|---|
direction? | Axis | Axis of measurement. Inferred when an endpoint is a gridline (the name knows its axis) or when a chain supplies one; required only for a dim between two element refs. |
eq? | EqGroup | Dims sharing an eq group are constrained equal. |
from? | DimEnd | Start plane. Required on a standalone dim. Inside a <DimChain> it is omitted: each link starts where the previous link ended. |
max? | Measurement | Maximum allowed distance. Same strength rule as min. |
min? | Measurement | Minimum allowed distance. Bounds sit below positioning strength unless the dim is required, so they check the solved layout and report violations rather than deforming it. |
name? | string | - |
priority? | DimPriority | Constraint strength. Defaults to "strong". |
to | DimEnd | End plane. |
value? | Measurement | The authored distance. A valueless dim is legal only as a chain link; solve fills the value in and reports it. |
Type Aliases
Axis
type Axis = "x" | "y" | "z";Defined in: bear/engine/dims.ts:13
Axis of measurement for a dim.
DimEnd
type DimEnd =
| Ref
| GridlineName
| RefName;Defined in: bear/engine/dims.ts:34
What a dim endpoint can point at: a plane by name, a Ref, or a gridline.
DimPriority
type DimPriority = "required" | "strong";Defined in: bear/engine/dims.ts:19
Dims default to "strong" so a contradictory model still renders and reports instead of throwing; "required" says this must hold.
GridlineName
type GridlineName = `@${string}`;Defined in: bear/engine/dims.ts:22
A gridline reference, resolved against the dim's axis: "@A", "@2".
RefName
type RefName = `${string}.${string}`;Defined in: bear/engine/dims.ts:31
A named element ref: "corridor.coreExt". Resolved lexically from the
dim's position outward (nearest enclosing scope wins); qualify with
more fqn segments to reach further ("L1.corridor.coreExt"). Strings
are names; to pass a reference across a component boundary, pass the
Ref object (getRef) instead, which is scope-free by identity.
Variables
Dim
const Dim: PartDef<DimProps, string, string>;Defined in: bear/engine/dims.ts:81
A dimension: the distance from one plane to another along an axis.
DimChain
const DimChain: PartDef<DimChainProps, string, string>;Defined in: bear/engine/dims.ts:102
An ordered run of dims sharing an axis, where each link starts where the previous one ended.
Functions
eqGroup()
function eqGroup(label?): EqGroup;Defined in: bear/engine/dims.ts:40
Create an eq-group token. Group identity is the token, not a string, so a typo cannot silently create two singleton groups.
Parameters
| Parameter | Type |
|---|---|
label? | string |