Skip to main content
The path can slope, so a railing can follow a stair.

Import

Example

Notes

  • All dimensions are in metres. The rail height is measured above the path.
  • Stair.attachRailing makes the railing follow the stair. Detach the railing before you dispose it.
  • balusterSpacing sets the distance between balusters. The clear gap also depends on the baluster size.
  • The default sizes are not a safety-code check.
  • When you replace topRail, give its width and its height.
  • 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.RAILING
Vec3[]
Rail base path (world coordinates). Segments may slope — a stair-hosted railing follows the flight nosings. The top rail runs height above this path; balusters drop from the rail to it.
number
Rail height above the base path (m). Guard code: ≥ 1.0 m typical.
number
Maximum clear spacing between balusters (m). Code: a 100 mm sphere must not pass — the 0.11 m default center spacing with 20 mm balusters keeps the clear gap at 90 mm.
number
Square baluster side (m).
RailingTopRail
string
ogid of the hosting Stair, when attached via Stair.attachRailing.
number
PropertySets

Properties

ElementType
string
Map<string, OPGeometry>
Map<string, OPGeometry>
boolean
boolean
boolean
RailingOptions
string
Vec3[]
number
number
number
string | undefined
number
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.

setHostPath

Replace the base path from a hosting element (Stair).

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).

setOPGeometry

getExportRoots

Vector-export roots (RFC §7).

toDrawing

Base path as standardized line primitives.

setOPMaterial

getEditAnchors

Draggable handles: one per base-path point, free on its own horizontal plane (Y preserved, so a sloped/stair-hosted path keeps its slope).

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

Types

RailingOptions

RailingTopRail

number
required
Horizontal rail width (m).
number
required
Vertical rail height/depth (m).
Last modified on October 11, 2026