mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-02 05:49:13 +01:00
feat(editor): laying from the photo in two modes, Tab switching them in one row of points: the points clicked as bends of straights, eased with two transition curves meeting with no cant, of 3000 to 6000 m set in the panel, or with an arc of the norms where they don't fit; or the points along the middle of a curve seen on the photo, the last two on the straight after it, a curve, compound or two with a straight between them, fitted to them with its radii and its transitions. The points clicked are kept where they are, a curve below the norms laid with its warnings in the colour of one; the line shown as the points are clicked, laid by Enter in one step of the undo and going on from its end, Backspace taking the last point back, Esc dropping the points not laid. A bend after a free end or a curve traced goes along its straight, dashed; the curves labelled with their radii, transitions, cant and speed, the straights with their lengths, the points traced in the colour of how far the line is from them, the curves of the line listed in the panel. The Plan sets two transition curves with no arc for a vertex. Selftests laymode, layradius, laytrace, layp, layreport, layenter, layback, laycancel, laysample
This commit is contained in:
@@ -5570,15 +5570,16 @@ void editor_mode::render_shortcuts_window()
|
||||
{"Shift+LMB", "Add a track to the selection, drag: a box"},
|
||||
{"RMB on a track", "What can be done with it"},
|
||||
{"K", "Split the selected track at the cursor, a break of the grade at the height of the ground"},
|
||||
{"L, LMB, LMB...", "Lay track: each click lays a piece and goes on from its end"},
|
||||
{"L, LMB, LMB...", "Lay track: each click a bend of the straights, eased with a large curve; Enter lays them and goes on from the end"},
|
||||
{"Tab while laying", "The points clicked next go along the middle of a curve seen on the photo, the last two on the straight after it; Tab again: back to the bends"},
|
||||
{"Drag from a free end", "Lead a track out of it; onto another free end: join the two"},
|
||||
{"Ctrl+wheel", "Laying: radius"},
|
||||
{"Shift+wheel", "Laying: arc then straight, straight then arc, arc, straight; at a free end: another way to join"},
|
||||
{"0-9 while laying", "Type the length (or the radius) of the next piece, Enter lays it"},
|
||||
{"0-9 while laying", "Type the length of the next straight, Enter puts the point"},
|
||||
{"Alt held while laying", "The direction in steps of 15 degrees, or 1:9, 1:6.6... to a straight track; the first click with Alt goes onto the axis of the track"},
|
||||
{"N", "Parallel track: LMB on a track, then the side and the spacing"},
|
||||
{"Shift+LMB on a track in L", "The Parallel tool (N) with it"},
|
||||
{"Enter / Backspace", "Laying track: lay up to the cursor / take the last piece back"},
|
||||
{"Enter / Backspace", "Laying track: lay the points clicked / take back the last point, then the last piece laid"},
|
||||
{"Del", "Delete the selected tracks"}}},
|
||||
{"Plan of a curve",
|
||||
{{"G, LMB on a curve", "Its design: the vertex and the radius to drag in the view, the curvature in the panel"},
|
||||
@@ -6545,6 +6546,12 @@ void editor_mode::on_key(int const Key, int const Scancode, int const Action, in
|
||||
}
|
||||
break;
|
||||
|
||||
case GLFW_KEY_TAB:
|
||||
// laying: the bends of straights or a curve traced, for the points clicked from now on
|
||||
if (is_press(Action) && false == anyModifier && ui()->mode() == nodebank_panel::TRACK && m_lay.active && false == ImGui::GetIO().WantTextInput)
|
||||
lay_switch_mode();
|
||||
break;
|
||||
|
||||
case GLFW_KEY_BACKSPACE:
|
||||
// area fill: remove the last outline point
|
||||
if (is_press(Action) && ui()->mode() == nodebank_panel::FILL && !m_fill_points.empty())
|
||||
|
||||
Reference in New Issue
Block a user