The review of #508 asked for these two.
- The choice of the track a station starts or ends on is trace_station::pick_station_track(), a free function of
editor/editorTraceStation: the tracks in reach in plan compared by bands of 3 m of height, then by the distance in plan, the
first of two alike. editor_mode::station_track_at() collects the tracks as before and takes its pick, in the same order and
with the same comparisons, so it picks what it picked. The unit case covers a flyover above and a bridge over a cutting
against the track at the height clicked, a high embankment within one band, a track only far above or below, the reach and
the width of the bands.
- st_5_station_failed: the station of st_1 made to fail after its first turnout, then after both turnouts with the line
between them not laid. Each time the turnouts laid are taken back, the main track is as it was, the clicks are kept but the
last one, the reason is told and Ctrl+Y has nothing to lay; the last click again lays the station in full.
- st_6_station_history_cap: the same station laid with the history capped at 2 steps, laid in full and not taken for failed.
- For them the self-test has stationfail <end|line> (the next station made to fail there, once; lay_station() asks
selftest_station_fails(), which only the self-test sets), historycap <steps> and expect laypoints <count>.
The track under a station point was left out when more than 3 m above or below the point clicked, which is ground plus trackbed,
a guess before the terrain loads and off on an embankment: such a station got no turnouts, with nothing told. The tracks in reach
in plan are now compared in bands of 3 m of height, then by the distance in plan, so one at the height clicked still wins over a
bridge or a flyover, and one only far above or below is still taken.
- lay_station() counts the steps of the history by their serials (history_top()), not by its size, which stops growing at the cap
of the history: there a station laid in full looked failed, back() took nothing back and Enter laid the line again; the steps
weren't joined, and the switches of a crossover came out none.
- A station refused takes its turnouts back and drops them from the redo stack: Ctrl+Y laid them without the line between them.
- A turnout goes into a plain track within 3 m of the height of the line traced, not into one on a viaduct above it or in a cutting
below it.