panel.
Before you start
You have a session from Start a building with a second storeylevel-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 ofpath 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.
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.
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 apanel 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.
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 withhost in place of path follows one side of a stair of the same storey.
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 onereplace-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.