Skip to main content

Import

storeyTilingError

Storeys must tile their segment exactly; return the mismatch (0 when they do).

resolveAreaKind

Explicit kind → parking use → parking; a storey whose top is at or below the site grade (world Y) → basement; otherwise gross.

AREA_KINDS

What a storey’s plate counts as.

massQuantities

Quantities of a stacked-prism mass, where options.grade is the world Y of the site grade (default 0) and a storey whose top is at or below it is a basement.

storeyFloorAreas

The gross floor area of each storey, kernel-free, in the order of storeys.

buildingFootprint

The footprint of the building buildingId of model: the area inside the outer face of the walls of one storey, with the outline of that face.

massBuildingCommand

The add-building command for a new building with one mass, from an outline drawn in site XZ metres.

massPartAddCommand

The replace-mass command that stacks a new part (segment) on TOP of the mass of a building, from an outline drawn in site XZ metres — a podium, then a shaft, then a band that projects past the shaft.
Throws: {BmEditError} invalid-target when the building has no mass, invalid-geometry for a bad outline and invalid-command for bad options.

massPartRemoveCommand

The replace-mass command that removes one part (segment) of the mass of a building, as the Delete key of an editor does.
Throws: {BmEditError} invalid-target when the building has no mass part segmentId, or when the part has parts above and below it.

massSegmentFootprintCommand

The replace-mass command that gives one part (segment) of a saved mass a new footprint in place: move, add or remove corners without making the mass again.
Throws: {BmEditError} invalid-target when the building has no mass part segmentId, and invalid-geometry for a bad ring or hole.

toBuildingUse

Coerce a BuildingModel use string to a BuildingUse (custom: prefix for anything unknown).

irMassToMassLike

The MassLike view of an BmBuilding with a mass: segments with their storeys resolved from building.storeys by id (in storeyIds order).

massToShell

Build the shell of mass as an BmBuilding.

BUILDING_USES

MASS_COLORS_BY_USE

The colour of a mass part by its use, when neither the part nor its mass has a color.

massSegmentColorCommand

The replace-mass command that gives one part of a saved mass the colour color (#rrggbb), or takes its own colour away when color is undefined; undefined when the part already has that colour.

Types

MassBuildingOptions

What massBuildingCommand needs besides the outline.
number
required
Floor-to-floor height of every storey, in metres; above 0.
number
required
How many storeys the mass has; an integer of 1 or more.
string
Use of the segment and of its storeys, for example office.
string
Name of the new building.
number
World Y of the bottom of the mass. Defaults to the site grade, or 0 without a site.

MassPartOptions

What massPartAddCommand needs besides the outline.

StoreyPlatesLike

StoreyFloorArea

The floor area of one storey, as storeyFloorAreas measures it.
string
required
number
required
number
required
AreaKind
required
number
required
Square metres; 0 when measuredFrom is none.
'slabs' | 'walls' | 'none'
required
slabs: the sum of the slabs named in slabIds. walls: the storey has no slab that counts, and the area is inside the outer ring of its wall centre lines. none: neither gives an area.
string[]
required
The slabs summed into grossFloorArea, in the order of the storey’s slabs: each by its id, or by its place (slabs[2]) when it has none. Empty unless measuredFrom is slabs. A slab of the storey that is not here has the role floor or ceiling, has the phase demolished, or lies outside the walls.

MassStorey

string
required
string
number
required
Floor-to-floor height, metres.
BuildingUse
Overrides the owning segment’s use for this storey (a retail ground floor under offices).
AreaKind
Explicit area classification. Derived when absent — see resolveAreaKind.

AreaKind

What a storey’s plate counts as.

MassLike

The structural shape massQuantities needs — a Building’s config, an BmMass, or a plain object.
string
required
string
number
required
World Y of the bottom face of segments[0].
MassSegment[]
required

BuildingFootprintOptions

What buildingFootprint measures.
string
The storey to measure. Absent: the lowest storey, by elevation, whose walls close a ring.
readonly string[]
Ids of roofs or slabs of the building, on any storey, whose outline counts as covered ground: a carport roof, a porch roof, an upper floor over open ground. Their outer rings and the wall faces count together, each place once. Absent: the wall faces alone.
'existing' | 'complete'
Which building to measure, as the phase of each wall says: complete, the building after the works (every wall but a demolished one), or existing, the building before them (its existing and demolished walls). Absent: complete.

BuildingFootprint type

ShellOptions

number
Default 0.3 m.
number
Default 0.25 m.
number
Default 0.25 m.
WallMaterial | string
BmColor
readonly string[]
The ids of the mass’s storeys to build. Absent: every storey. Skipped storeys keep their height, so each listed storey stands at its elevation in the mass. A segment gets its roof only when its top storey is listed. Throws if the list is empty or names a storey the mass does not have.

MeasuredBuildingFootprint

A footprint buildingFootprint could measure.
true
required
string
required
string
required
number
required
Square metres: wallFaceArea and the coveredBy outlines together, each place once.
number
required
Square metres inside the outer face of the walls, arcs counted exactly.
PointXZ[]
required
The outer face of the walls: corner i starts edge i.
({ through: PointXZ; } | null)[]
required
One entry per edge of outline: { through } for an arc, null for a straight edge.
string[]
required
The ids that options.coveredBy named.

UnmeasuredBuildingFootprint

A footprint buildingFootprint could not measure, and why.
false
required
string
required
string
The storey that was asked for, when one was.
string
required
Last modified on December 1, 2026