Skip to main content
It also draws the plan symbol.

Import

Example

Notes

  • Dimensions are in metres. origin is [x, z]. rotation is in degrees.
  • Floorkit calculates the number of risers from the rise. Read actualRiserHeight for the result.
  • Layout warnings tell you about steps that are not comfortable. They are not a building-code approval.
  • attachRailing makes a railing follow the stair.
  • Start the geometry kernel before you create this object. See Floorkit.
  • This object is live geometry. To save a building, write it in a building model.
Inheritance: extends OPElement implements IShape, IPlaceable, PlanVectorExportable

Constructor

string
string
ElementType.STAIR
StairLayout
Point2
Plan position of the first flight’s walkline start: [x, z].
number
Plan rotation in degrees about origin (CCW viewed from above).
number
World Y of the stair base.
number
Flight width (m).
number
Level-to-level rise (m).
number
Tread depth / going (m); clamped to ≥ 0.1, warned below 0.25.
number
Optional target riser height (m); the solver auto-counts equal risers at or below min(riserHeight, maxRiserHeight).
number
Hard riser cap (m).
number
Landing depth (m), clamped to ≥ width (L/U layouts).
StairTurnDirection
L/U turn direction walking up: “left” or “right”.
boolean
Draw the conventional break line in plan.
number
PropertySets

Properties

ElementType
string
Map<string, OPGeometry>
Map<string, OPGeometry>
boolean
boolean
boolean
Event<null>
Fires after every geometry rebuild — hosted railings re-derive their paths from it (mirrors onWallGeometryChanged/onOpeningUpdated).
StairOptions
string
StairLayout
StairTurnDirection
number
number
number
number
number
number
boolean
number
number
Read-only. Solved riser count. Computed, read-only.
number
Read-only. Solved equal riser height (m). Computed, read-only.
number
Read-only. Total walkline length in plan (m). Computed, read-only.
string[]
Read-only. Industry-rule warnings from the last layout solve (riser cap, tread minimum, 2R+T comfort). Empty when the stair is code-friendly.
StairLayoutResult
Read-only. The solved flight/landing layout in stair-local coordinates.
boolean
boolean
boolean

Methods

editableSchema

Self-describing editable surface; a host inspector renders this generically.

getPhysicalParts

Borrow actual material parts; descriptors contain no seeds, cutters or symbols.

move

Translate this element by delta (world-space, meters).

rotate

Rotate this element by angleDeg around axis (default Y-up), pivoted at anchor (default the element’s own centroid).

getRailingPath

Rail base path along one side of the stair: flight start → flight top at the step-walking-surface heights, then level AROUND the landing — never diagonally across it.

attachRailing

Host a railing on this stair: derives its base path from the flight nosings on the chosen side and re-derives it on every stair rebuild (subscribes onStairUpdated — the wall attachDoor re-bind pattern).

detachRailing

Unhost a railing: stops syncing its path (the path itself is kept).

getHostedRailings

Railings currently hosted on this stair.

setOPGeometry

getExportRoots

Vector-export roots (RFC §7).

toDrawing

Plan symbol as standardized primitives, emitted parametrically from the solved layout: flight/landing regions, nosing lines, the walkline with its arrowhead, and the break line.

setOPMaterial

getEditAnchors

Draggable handles for a parametric stair: the plan origin (free on the floor plane), an elevation grip (vertical), and width, going and landing grips that slide across or along the first flight.

applyEditAnchor

getOPConfig

setOPConfig

beginEdit

Start one live edit; a second beginEdit before endEdit keeps the first start.

endEdit

End the live edit; its exact undo and redo, or undefined when no option changed.

dispose

computeStairLayout

Solve the riser count and lay out flights/landings for the requested configuration.

Types

StairOptions

StairLayout

Pure stair layout solver — riser math and flight/landing plan rectangles in stair-local coordinates, separated from the element class so the industry rules are unit-testable without the WASM kernel.

StairTurnDirection

StairLayoutResult

number
required
number
required
number
required
Total tread rectangles across all flights.
number
required
Total walkline length in plan (flights + landings).
number
required
Clamped landing square side, max(landingDepth, width). 0 for STRAIGHT.
StairFlight[]
required
StairLanding[]
required
string[]
required

StairPlanDrawingOptions

View-only options; never change the saved stair dimensions or solids.
number
Finite world Y of the plan cut.

StairLayoutInput

StairLayout
required
number
required
Flight width (m).
number
required
Level-to-level rise (m).
number
required
Tread depth / going (m).
number
Target riser height (m); the solver picks the count whose equal risers come closest below this. Defaults to 0.178.
number
Hard riser cap (m). Defaults to 0.19.
number
Landing depth (m), clamped to ≥ width (L/U layouts).
StairTurnDirection
L/U turn direction, viewed from above walking up: “left” turns toward −Z, “right” toward +Z.

StairFlight

number
required
Risers this flight climbs (its tread count is risers − 1 when it ends at a landing — the landing is the arrival surface — and risers for the final flight, whose top tread represents the arrival level).
number
required
Elevation of the flight’s first tread’s base above the stair base.
PointXZ
required
Unit run direction in local XZ.
StairStep[]
required
{ start: PointXZ; end: PointXZ; }
required
Walkline along the flight centerline, base → top.

StairLanding

StairRect
required
number
required
{ start: PointXZ; end: PointXZ; }
required
Walkline across the landing connecting the adjoining flights.

StairStep

StairRect
required
Plan rectangle of the tread.
number
required
Elevation of the tread’s walking surface above the stair base.

StairRect

Axis-aligned-in-local-space plan rectangle, CCW [corner, +run, +run+across, +across].
Last modified on October 11, 2026