18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-01 04:47:06 +01:00
Commit Graph

2 Commits

Author SHA1 Message Date
maj00r b3a2f1fef2 feat(editor): the vertices of a line of the model dragged on the map, the line as the model would lay it shown before they're let go
Continues E4b (editor-tracks-domain.md §0 pkt 2, §8 "Przesuń wierzchołek", "Zmień R / L / D wierzchołka"): the route design opened on a
line of the model has its handles on the map, a vertex and the grip of the radius of each curve.

- While a handle is dragged the change is tried on a copy of the network as it goes: the line as the model would lay it drawn over the
  map, green, or red where it's refused, and by the mouse and in the panel why it's refused or what the norms say of it ("The norms:
  2 notes"). Let go, it's one command of the model: move_vertex for a vertex moved, set_vertex for a radius dragged; a vertex moved and
  its curve changed at once one set_vertex with its place (layout::set_vertex::point), one step. The first and the last vertex of a
  line of two or more go along the tangents of its ends, as the route design drags them.
- No gizmo on the tracks of a line of the model, nor the points of their paths dragged by hand: the line is edited through the route
  design. The gizmo stays for the old tracks and the models.

Self-test: modelplan opens the route design in the field of the tracks; expect modelvertexat <line> <index> <x> <z> <tolerance>, expect
modelpreview <shown|none>. The case m_11_vertex_drag (the vertex dragged with the mouse, the preview told while it's held, one step).

Tests: U: a vertex moved and its curve changed by one set_vertex, one step, taken back.

lang/editor_pl.po: the Polish of the new texts.
2026-11-23 18:48:19 +01:00
maj00r 6c2d467c5a feat(editor): the switches of the switch tool on the lines of the model its turnouts, inserted, moved, changed and taken out by its commands
Continues E4a (editor-tracks-domain.md §7, §8; stage E4b): with the editing on the model on, a switch dragged on a track of a line of
the model is a turnout of the catalogue of the model, and so on, each a command, refused with the reasons or one step of the history.
The switches of the old tracks are laid the old way.

- The drag of the switch tool, let go on a line of the model (on a straight or along a curve), is insert_turnout: the type of the
  catalogue the template is of (a template of the user's own isn't), its start where it was pressed, its chainage on the line
  (layout::chainage_of), the side of the drag its hand, the way it was dragged its direction. While it's dragged the panel tells in its
  red line why the model would refuse it, tried on a copy; let go, a refusal is told there with the value, the limit and the paragraph
  ("(9.6 pkt 16)"), nothing changed. Laid: its switch track made by the generator (t<n>), selected, the panel placed, its speed told.
- A turnout of the model selected: the inspector shows its type, side, speeds and bending, the templates of its kind of the catalogue
  (change_turnout), the other side (change_turnout of the hand), moved by a distance (move_turnout), taken out (remove_turnout). The
  slide of the switch tool moves it, another template changes it, Del takes it out (after the scenarios are looked through), each a
  command. Plan on a track of a turnout doesn't open: the turnout is edited through itself.
- A crossover dragged between two lines of the model is connect_tracks of the solver of the connections; refused, the solver's best
  proposal is told with the reasons ("Proposal: Rz 60E1-300-1:9 needs them 4.498 m apart").
- The tracks after a command: of a turnout one of whose tracks changed, its tracks of the simulator made again whole, kept by its main
  track (kind switch, the plain tracks of a double switch, a slip or a crossing with them); written with the scenery as the generator
  made them, recorded in the project with their kind and the file each went into (session::record_written of pieces of several files),
  found again when the map is opened, nothing taken for changed by hand. project::session::generate(turnout_id).

Self-test: modelturnoutside <track>; expect modelproposal <holds|lacks> <text>, expect handlines <count>; expect modelends checks the
paths of the switch tracks at the numbers of the nodes; a crossover of the connection command between two lines of the model goes to
the solver of the model. The cases m_8_turnout (a turnout dragged on, taken back and brought again, moved, given another type and side,
taken out by Del; one 2 m off the end of a cant ramp refused, nothing changed; saved and found after a reopen) and m_9_crossover (a
crossover between lines 4.75 m apart, one between lines 4 m apart refused with the proposal).

Tests: U: the chainage of a point on a line and its distance; the switch track of a turnout made by the session, the tracks of a line
written into two files recorded.

lang/editor_pl.po: the Polish of the new texts.
2026-11-23 18:48:19 +01:00