Skip to main content
A railing is a top rail along a path. Under the rail it has square balusters, or glass panels when you give it a panel.

Before you start

You have a session from Start a building with a second storey level-1 at elevation 4.5. See Add a storey. The stair rail below also needs the stair main-stair from Add a stair on the storey of the rail.

Write the railing

The points of path are [x, y, z] in world coordinates, not relative to the storey. This balcony railing stands on a storey at elevation 4.5, so every point has y 4.5.
A point below the storey’s elevation, or above the elevation plus the height, validates with a path-outside-storey warning. A y written relative to the storey is the usual cause.

Add it to the storey

Curve the path

arcs bends a segment of the path: arcs[i] is { through } for segment i, a point the arc passes through, or null for a straight segment. cornerRadii rounds a corner: cornerRadii[i] is the radius at the inner point path[i + 1], or null for a sharp corner. Either takes a level path, with through at the same y.
The top rail sweeps the arc as one continuous rail. On a path with sloped segments elsewhere, the curved rail is built as short straight pieces of at most 5° of arc each, not as a true arc. Balusters stand at their spacing measured along the arc, not along its chord, so a curved segment carries more of them than a straight one between the same two points. The plan draws the arc, and the IFC export writes an IfcRailing whose body is swept along it. A corner radius may be at most what the two segments beside it leave, and a corner beside an arc segment takes none. Both are refused at validation with corner-radius-too-big and corner-radius-arc-edge.

Glass panels

Give the railing a panel and it builds glass in place of the balusters. Each segment of the path is split into equal bays no wider than 1.2 m, with one pane in each bay. Along an arc the glass is faceted: the arc is split into straight panes no wider than 1.2 m, each standing on its chord.
  • posts: a post at each end of each bay, with the glass between them.
  • spigots: two spigots under each pane, which stands on them.
  • clamped: two clamps on the lower edge of each pane.
A panel takes only these three fields. Any other key is refused with unknown-field. Sections and elevations draw the panes as glass: they hide nothing behind them. The plan draws the railing as its path, arcs included, with or without glass. A plan view with railingLines: 'double' draws each railing as two lines, the two faces of its top rail, one topRail.width apart. The lines meet at the corners, an arc draws as two arcs, and a line across the rail closes each end of a path that is not closed.

On a stair

A railing with host in place of path follows one side of a stair of the same storey.
The plan of the storey above draws the part of the rail above the lower plan’s cut, as it draws the stair: thin, and not selectable there.

Edit it

In the plan and in the 3D editor, a free railing has a grip on each point of its path. A drag saves one replace-element with the new path in whole millimetres. The heights of the points stay. A hosted railing has no grips: it follows its stair. replaceFields changes the fields an inspector shows, by their schema paths:
GUIEditor.startRailingDrawing(storeyId, options) draws a railing in the 3D editor with the keys of the wall draft. Enter saves it; a click on the first point closes it.
Last modified on November 16, 2026