E6 (editor-tracks-domain.md §10): a set of old tracks made lines of the domain in one step to undo (editor/layout/layoutLegacy and the
command take_over). Model only: the question with a preview before and after is the editor's, after E4a.
- legacy_track: an old track as its entry has it, in the world, with no scene: its name, its paths, the words before and after them.
walk_chains(): the plain tracks of the set chained the way a train runs them (the chain walking of the old digitization, kept): a track
joined at an end to exactly one other plain track of the set, within the 2 cm the simulator joins them within, goes on into it; a
switch, a track not taken over, a fork or a free end ends the chain, held in the heading of the main path of the switch or of the track
holding it, which the line runs on from. Each chain runs from its end the smaller in x, then in z, whichever track it was found from.
- plan_takeover(): each chain recognized (layoutRecognition), its held ends kept, the old tracks along it as its hard splits (a track named
none of no name), the class of its line of the highest speed of its tracks; the deviation of each line and the worst of all; silent where
each line keeps within the tolerance. Nothing is laid.
- take_over, a command of the model: the lines between new nodes at the ends of their old tracks, their vertices, grade lines and old
tracks as recognized. The invariants refuse it as they refuse any command; the norms don't: the BLOCK limits the old tracks pass are told
in outcome::broken (an old track may break the norms where nobody touched it, improving it is a separate decision; edits of the lines
after it are judged by edit_policy::no_new_block). take_over_tracks() executes it and returns the deviation of each line and whether
the takeover is silent, for the question.
- A switch stays an old track, a fixed constraint: the lines end at its legs in its headings. Its type recognized in the catalogue and the
switch laid into the line as a turnout, so the line runs on through it, is left for later.
Tests: U: the line of three curves cut into old tracks, each written the way it was: the tracks in three random orders, seeds 4401, 5502 and
6603, the walk starting from another one of them each time: the same line, its vertices to 1e-6 m and its radii and transitions to 1e-9,
the same old tracks at the same chainages. Unit tests 1103 -> 1104.