18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-03 11:15:23 +01:00
Commit Graph

2 Commits

Author SHA1 Message Date
maj00r bdffbccd2a test(editor): the station track picked by bands of height in a unit case; a station failing half way and one at the history cap in self-tests
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>.
2026-12-02 17:35:09 +01:00
maj00r 739225b0e7 feat(editor): stations traced on the photo (Etap 5): laying from the photo, a first click on a straight track starts the line with a turnout of the catalogue into it, of the rail of the track or of the assumptions, its type, its start along the track, the way it runs and its side fitted to the points clicked along its diverging track and the straight just beyond it, the start held within a few metres of a click on the main track (where the points tell no type: the one the line starts with, the one chosen in the switch tool, the usual one of a station), and a click on a track, or Enter over one, ends the line with one into that track; from a click on a track to one on a track alongside it 2.5 to 15 m away with only the points along the crossover between them, the crossover of the solver of the connections; a run of three points or more over 40 m keeping one spacing from a track beside it within the noise of the clicks laid exactly alongside it, the spacing rounded to 4.0, 4.5, 4.75 or 5.0 m within 0.1 m of it, else to 5 cm: alongside a straight track from a turnout or into one designed, an arc joining each turnout onto the straight alongside, its radius fitted to the points along it, else its points moved onto the spacing and traced; a turnout nearer to the next one on its track than the straight the norms ask between turnouts (ST-T1-A6 11.3 pkt 7, max(0.15 V; 6) m at the speed of its diverging track) moved along the track to where it keeps it, told by how much and why; the turnouts laid by the code of the switch tool, the line between their diverging tracks as the lay tool lays one between free ends, no faster than the turnouts where it runs between two, all of it one step of the history; refused with the reason and the way to do it into a curve, on a line of the model, where there's no room between the turnouts; the turnouts as they'd go in told on the view with their type and speed, the crossover, the run alongside with its spacing, and in the status of the lay tool; expect station of the self-test, cases st_1..st_4, unit tests; Polish translation 2026-11-25 21:06:47 +01:00