18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-01 17:37:09 +01:00
Files
maszyna/editor/layout
maj00r 9c76001e9a feat(editor): the project file of the track geometry, one per map, of a schema of its own
The first part of E3 (editor-tracks-domain.md §9): the domain of the editor written next to the scenery, the .scn and .scm files
staying what the simulator reads. editor/project/projectFile reads and writes it, nothing else does; nothing of the editor uses it yet.

- <map>.eu07proj next to the file of the map, shared by the scenarios of the map; plain text, a line a record, the version of the
  schema on the first line. Version 1:
    eu07proj 1
    next node 9 line 8 vertex 1 turnout 3
    norms plk
    area granica ch 4 -500 0 -100 0 -100 400 -500 400
    lineprofile 91 en13803
    class 1 vmax 80 vmin 0 traffic mixed track main load 5 features 0
    node 3 at 300 101.2 0 heading 1 0 curvature 0 cant 0 grade 0.004 ends 3 1 end 1 2 start 1 4 start 1
    line 1 from 1 to 3 class 1 chainage 0 transition clothoid ramp linear continues 0 0 turnout 0 profile tsi
    vertex 2 at 0 800 radius 300 in 60 out 60 cant 40
    grade 200 101.5 5000
    end
    turnouts
    turnout 1 type Rz%2060E1-500-1:12 hand 1 direction 1 start 3 main 2 4 diverging 4 5 chainage 300 radii 0 500 cant 0
      speeds 80 60 velocity -60 movable 0
    end
    anchors ... end                      kept for E6 as read, empty in version 1
    generated ... end                    the tracks the generator wrote (the next commit)
    legacy h trasa/tory.scm line 1 [why ...] / | <the //$ line> / end    the //$ lines read when the map was first opened
  The profile of the scenery, the areas and the lines by name; the classes of the lines, each one once, the lines naming theirs; the
  nodes with all they hold, the ends in their order; the lines with their vertices, grade breaks, shapes, chainage, turnout and
  profile of their own; the turnouts of E2b with their legs, their tracks and what they derive. Numbers in the shortest form which
  reads back to the same double, names and files with %20 for a blank.
- Read: the lines laid between their nodes as read, then the diverging tracks laid by their turnouts off the main tracks, the nodes
  and the turnouts as written; what refers to what checked (a line's ends held once by its nodes, the classes there, the turnouts and
  their tracks each of the other); a file of a newer schema refused before anything of it is read, with the reason, as is one which
  isn't a project file, has a record not of its version or a section not ended. Saved through a file next to it put in its place.
- The identifiers handed out are kept (next), so none is handed out again after a load, whatever was deleted before the save:
  layout::network gets handed() and hand_out(), the turnouts' counter with them; nothing else of editor/layout changes.

Tests: G: a network edited by the model (a line deleted between two) written, read and written again: the same text, the lines laid
again the same to the bit as the model laid them; two turnouts, one against the line, and a line of a profile of its own: the same to
the bit, the diverging tracks too (the network as settle() leaves it: the model lays the diverging track of a turnout against the line
before the node at its start takes the grade of the line beyond it, 1e-16 off); the golden file of data/project/ read and written back
the same, with the line ends of windows too; the anchors kept as read. A newer schema, an empty file, not a project file, broken
records (a turnout whose track isn't its among them) refused cleanly. U: the identifiers after the last line is deleted, a save and
a load: the next line, its nodes and its vertices numbered past them.
2026-11-23 13:11:45 +01:00
..