Import
Example
Notes
- All dimensions are in metres. The rail height is measured above the path.
Stair.attachRailingmakes the railing follow the stair. Detach the railing before you dispose it.balusterSpacingsets 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.
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
getPhysicalParts
setHostPath
move
delta (world-space, meters).
rotate
angleDeg around axis (default Y-up), pivoted at anchor (default the element’s own centroid).
setOPGeometry
getExportRoots
toDrawing
setOPMaterial
getEditAnchors
applyEditAnchor
getOPConfig
setOPConfig
beginEdit
beginEdit before endEdit keeps the first start.
endEdit
dispose
Types
RailingOptions
RailingTopRail
number
required
Horizontal rail width (m).
number
required
Vertical rail height/depth (m).