maj00r
f5895abfa8
feat(editor): tracks drawn without a design get digitized: the route design keeps the line it opens in the scenery when no design is kept for it, or says why it can't (straights meeting with no curve, the curves read leaving a path by how much), trying the other transition shape before giving up; Digitize all the tracks in the route design does it for every line of the scenery and reports the count; a kept design counts as departed only where no path lies along it any more, so a parallel track or a diverging one beside a digitized line no longer shows it as left by metres; self-test command digitizeall
2026-10-12 03:24:23 +02:00
maj00r
696168a132
feat(editor): fewer hints in Tracks: the bar in the view is one line with a short mode name and at most three keys, fading when the cursor comes near; the tool options show only the mode name with the full list under (?), the inspector says Nothing selected; the hints name what is dragged instead of its colour or shape, the break is press and drag, the S-curve its four clicks, the turntable and the signal with no type chosen have their own; Esc back to Select only in the full list; the gizmo settings are hidden in Plan; in Polish a track is tor everywhere, odcinek only for a piece being laid, an isolated section and a path of a switch
2026-10-12 02:59:30 +02:00
maj00r
f81698eaf1
feat(editor): the top view zooms out to 50 km for a whole line, from 0.5 m per pixel the rail tracks are drawn as thin lines and the hover reaches 16 px around them, only the tracks near the cursor are checked; handles drag beyond 200 m from the camera in Tracks; Plan works with the mouse alone and without the gizmo: the grips of a straight, the vertices and the radius of a curve drag directly, the break tool is press on the straight and drag, the panel tool stays chosen afterwards, the Q/W/E bar is hidden in Plan; self-test command ortho
2026-10-12 02:49:07 +02:00
maj00r
16c90eb674
feat(editor): Straight and Curve are one Plan tool (G, also C) right after Lay track, a straight opens with its grips, a curve or a line with its vertices; digits no longer type a length while extending from a free end; the scenery wizard chooses realistic or fictional, a realistic one gets //$g and //$o and opens with the orthophoto in the top view, a fictional one only the top view with the grid; the orthophoto settings are kept in the scenery as //$o (on, year, opacity, radius, height, drape, lift, hires, scene, origin) and survive the new formats; self-test command mapstate
2026-10-12 02:21:29 +02:00
maj00r
653d206a54
feat(editor): the vehicle tool places trainsets: what is placed on a named track is written to the scenery on save as trainset <timetable> <track> <offset> <speed>, with reversed when it faces against the track, listed until the save with x to leave one out; the timetable and the starting speed are set in the panel, a tick turns writing off for a vehicle only to drive; the starter WMB10 is only added when nothing was placed; self-test command trainset
2026-10-12 02:00:50 +02:00
maj00r
c9f381a9c9
feat(editor): the parallel track is a tool of its own (N) in the toolbar, its green preview only shows there, Shift+click on a straight in L opens it with that track; the norms are two buttons at the top of the Lay panel and of the Curve tool, shared by both, free hides the recommendations of the curve and its norm warnings, the duplicate transitions checkbox is gone; the Lay panel starts with the radius, the speed and the shape; the Tracks toolbar shows the tools that lay track, the ones that correct a line are under More (remembered); First steps ends with driving the track laid; self-test command tracktab
2026-10-12 01:52:28 +02:00
maj00r
7fea51ad06
feat(editor): norms of laying, free by default: free lays plain arcs with no transition curves and no cant and keeps quiet about the norms, PKP PLK gives the transitions and the cant for the design speed with the warnings, chosen at the top of the Lay panel; digits in Tracks only type values, never change the edit mode; in Lay a track under the cursor says the click starts on the ground beside it, Shift+click chooses it for a parallel track; Alt while laying turns the direction in steps of 15 degrees, with the azimuth by the cursor; K splits only within 20 px of the selected track, where a marker shows it; the environment, overhead line, transition curve, view and include labels translated, one name for laying track in Polish
2026-10-12 01:35:39 +02:00
maj00r
f28640dd44
feat(editor): laying track for a beginner: Ctrl+Z and Backspace during a chain of laid pieces go back to the end of the piece before instead of carrying on from a removed track (Ctrl+Y ends the chain); every warning of the laid shape and of a join is shown by the cursor for 4 s after the click, also when the radius chosen on the wheel didn't reach the cursor and the arc goes through it, the preview of a shape with a warning is orange as it is laid anyway; the switch type stays chosen after a switch is placed; the status says each click lays a piece; a "First steps" window (Help menu, opens with the editor until unticked) with eight steps ticked off as they are done; an empty scenery opens in Tracks with the camera over its origin and a grid where there is no ground under the cursor; F1 lists the laying gestures (Ctrl/Shift+wheel, drag from a free end, typed length); self-test command laychain; Polish translation
2026-10-12 01:21:50 +02:00
maj00r
866f626668
fix(editor): K splits the selected track where the cursor points on screen (as the hover highlight finds it), not at the delayed depth pick which hit the ground beside the rail
2026-10-12 00:44:54 +02:00
maj00r
704511fe5e
feat(editor): the plain straight a switch branch leads into gets its end moved to where the branch lands instead of a short straight being added: shortened when it reaches past, lengthened when it ends short; straights drawn with handles count (the trimmed end loses them), so a switch slid up to a track that ends close to the crossing now places
2026-10-12 00:36:13 +02:00
maj00r
b27d1772a7
feat(editor): a switch being placed slides along its straight first, so its branch lies on the line of the track it leads into (a straight between, or an arc of the switch radius right after it with the arc ending at the track's end); only when the slide leaves the straight it stays put and reverse curves fill in; the straight between reverse curves takes the speed of the switch's branch (R<300 40, <500 50, <760 60, <1200 80, <2500 100 km/h) instead of the track's
2026-10-12 00:25:01 +02:00
maj00r
d4d2a02018
feat(editor): the switch no longer slides to meet the track, only the straight and arc fill in: arc of the switch radius between two straights, and where the angles match but the tracks are apart, or the arc doesn't fit, reverse curves with no transitions and the largest radius that fits; the straight between them (6 m to V 60, 0.15 V to 100, 0.25 V above) only when 1/R1 + 1/R2 > 1/106.5 m (PLK ST-T1 9.3, table 9.4); new pieces take the style of a plain track, not of a switch
2026-10-12 00:09:49 +02:00
maj00r
0a73550c8d
feat(editor): the branch of a switch leads into the free end of a track: when the angles match the switch slides so its branch lies on the track's line, otherwise an arc of the switch radius right after the switch turns into it (with a straight between for a parallel track); works while placing a switch (drag toward the end) and when dragging from the branch end of a placed one, the track is shortened when it reaches past the branch; self-test switchlink / branchlink
2026-10-11 23:53:18 +02:00
maj00r
f1a3bde00f
refactor(editor): one declaration per statement (cpp:S1659) and no chained assignments (cpp:S1121) in the editor files of the branch; single statements under if/else/for that became two got braces
2026-10-11 22:28:35 +02:00
maj00r
d2111afe19
refactor(editor): alignment::join builds its candidates (straight, single arc, fitted curve, Bezier fallback) in separate functions, alignment_store::load reads each //$h line kind in its own function
2026-10-11 22:23:21 +02:00
maj00r
84cec61912
refactor(editor): the self-test runner dispatches its commands to seven groups (scene, bends and lineside, tracks and routes, switches, joining and gizmo, signals, terrain) instead of one function with 95 branches; deletetrack without a name deletes the selected path, which its second, unreachable branch meant to do
2026-10-11 22:17:22 +02:00
maj00r
3e9d5836f4
refactor(editor): the //$e header scripts share reading, decoding, the rewrite of the header, the backup and the zip in tools/editor/editor_headers.py instead of three copies; reports, zips and written files unchanged
2026-10-11 22:11:44 +02:00
maj00r
4030797b21
refactor(editor): the layouts laid from a free end (arc then straight, straight then arc, arc, straight) and the transition curve out of a curved neighbour in editor_track; joining and laying through points share the eased ends, the room check and the assembly of the pieces instead of two copies
2026-10-11 22:09:53 +02:00
maj00r
c5ac698702
refactor(editor): split the track mode into its gizmo, kept records, switch drive, switch slide and track bed files; path geometry shared in editorGeometry instead of four copies of the reversed path, track shape rules (stretching, rolls at joints, middle, switch axis, drive spot) in editor_track, fitting the track to the ground in ground_follow with the terrain query passed in, the record layer and the switch classification in the stores; long gizmo, record watch and switch slide functions broken up, out-parameters replaced by optional results
2026-10-11 22:03:59 +02:00
maj00r
f34056ff5a
fix(editor): the key launcher of a turntable reaches at most half way to the nearest other turntable (up to 150 m as before), so T and Shift+T turn only the turntable at hand where several stand close together, as on sk.scn
2026-10-11 21:33:28 +02:00
maj00r
777d1fbfe4
feat(editor): turntable_headers.py writes //$e descriptions into the turntable templates of the scenery that have none (eng/obrotnica21m.inc, linia61/cze_obrotnica.inc): category turntable, length from the obrotnica<N>m model, the fixed positions read from the torNrot events, so the editor places them like its own; --zip packs every described turntable template, the editor's obrotnica16m_e and obrotnica21m_e included
2026-10-11 21:33:28 +02:00
maj00r
33360eb4e2
fix(editor): drive_headers.py writes height 0.05 for the electric drives ele and ele1, which looked 5 cm too low on a switch laid in the editor
2026-10-11 21:33:28 +02:00
maj00r
080e308d5e
feat(editor): picking a drive or its side in the Switch mode panel changes the drive of the selected switch at once, no drive takes it away, each as one undo step; self-test command drivechoice; Polish translation
2026-10-11 21:33:28 +02:00
maj00r
b4a1cb03b3
fix(editor): drive_headers.py writes height 0 for every switch drive, as all drives of the digitized lines stand at the rail foot of the start of the switch
2026-10-11 21:33:28 +02:00
maj00r
71bdf8e284
fix(editor): a switch drive stands at the height given in its //$e description, switch: {height: ...} above the start point of the switch (rail foot): placed with a new switch, swapped for another drive or side, or following its switch; drive_headers.py writes height 0.15 for ele and ele1 and 0.05 for mech and mech1, whose models reach that far below the origin, so they stand on the sleepers; the drives with a counterweight (mech_*, mech2, 0.57 m down) keep 0, as all 1965 drives of the digitized lines do
2026-10-11 21:33:28 +02:00
maj00r
b103a561e0
fix(editor): the drive of a switch follows the switch: moved, turned, its grade or cant changed with the gizmo or any other change of the switch, the include gets the new position, direction and rot.x/rot.z of the start of the switch, in the same undo step; self-test drives prints the parameters of the drive
2026-10-11 21:33:28 +02:00
maj00r
4b785f3789
fix(editor): putting a drive by a switch that has one puts it in place of the old one instead of next to it; the window of a switch with a drive shows which drive it is and on which side, and picking another drive or the other side swaps the include as one undo step; the default drive is the electric ele (no lever, no lantern); the last entry of editor_pl.po is read; self-test commands driveput and drivefamily; Polish translation
2026-10-11 21:33:28 +02:00
maj00r
dae97f7169
feat(editor): every switch laid gets its drive at once, also the one made by pulling a free end into a straight (named z1, z2... like the others): the drive marked default: true in its //$e description (mech_komin) until another is picked, on the diverging side or the other; the drive goes into the same undo step as the switch; a switch with a drive puts it on the other side with one button, as one undo step; drive_headers.py marks mech_komin as the default; self-test commands drives and driveflip; Polish translation
2026-10-11 21:33:28 +02:00
maj00r
2751c085d8
feat(editor): tools/editor/drive_headers.py writes the //$e switch drive descriptions (category switch drive, the hand of the switch and the side of the drive, the switch name as the track parameter, rot.x/rot.z for the grade and cant) into the templates of scenery/tory/napedy and packs them into a zip; the crossing drives ele_x are left out
2026-10-11 21:33:28 +02:00
maj00r
12f7fc879f
feat(editor): a switch on a straight slides along it: drag it with the mouse in the Switch or Path mode (snapping to the joints, km shown) or type the distance in its window; the straight paths on both sides get shorter or longer, the ones it runs over are cut, the next switch or the end of the straight stops it; Replace the geometry with the template does the same with the ends of a longer or shorter type instead of leaving the neighbour overlapping it; a straight neighbour following an end that neither moved off its line nor turned keeps its zero control vectors; self-test commands switchslide, switchreplace, pathsnear; Polish translation
2026-10-11 21:33:28 +02:00
maj00r
3b503ede0c
fix(editor): the route design keeps its whole fragment after Apply: the last path of the line is the one holding the last piece, not the original end path holding the first piece of its group, so a second Apply (e.g. after changing the share of a compound curve) no longer re-lays only the front part and leaves the old tail lying next to the new paths; the same for the curve laid with the straight tool
2026-10-11 21:33:28 +02:00
maj00r
11aa67378d
feat(editor): the drawn tracks kept in the scenery as //$h lines as they are drawn: laying, pulling out of a free end, joining two ends and the parallel track record the whole line they belong to, its straights, arcs and transition curves, with the radii from the chord and the turn of the arcs and the transitions from the turn they make, in the same undo step; the curves read in the route window and the Curve tab are what the paths are, no transitions or cant made up for them; a curve ends at the point of reverse; a parallel arc is concentric with its source; the paths laid in pieces of up to 90 degrees match the kept design within their own approximation; 'Keep the line as it lies' for lines drawn before; self-test commands digitize and parallel; Polish translation
2026-10-11 21:33:28 +02:00
maj00r
4ea2f4f13f
feat(editor): the kept alignments and switches after a drag of the gizmo or of a point: a line all of whose paths are moved or turned as a whole takes its kept design along; paths pulled out of a kept design, or given another cant, are told about on the status line with the way back; a switch moved or turned as a whole keeps its type and its record follows it, with its km; a switch bent out of the shape of its type loses it and is told about (//$r records keep the shape of the switch); all of it in the same undo step as the drag; Polish translation
2026-10-11 21:33:28 +02:00
maj00r
ddb637a3f5
feat(editor): undo and redo take back the kept alignments and switches together with the paths: each step of the history keeps the //$h and //$r records from before it; a deleted switch or slip forgets its record in the same step, so undoing the deletion brings it back; edits of the switch number, rail and km and forgetting a kept design stay outside the history; self-test commands deleting paths
2026-10-11 21:33:28 +02:00
maj00r
b466755a0f
feat(editor): single slip (Rkp 1:9 R190/R300) joining the pair of tracks on the side of the click, and crossing (Skrz 1:9, 1:12) of two straights, placed as the double slip is, at a crossing of two straights, and kept in the scenery as //$r records with their parts; the list of the slip switches and crossings; Polish translation
2026-10-11 21:33:27 +02:00
maj00r
0bfb8a4e7c
feat(editor): switches kept in the scenery as //$r lines: type (Rz, arc Rlj/Rld, slip Rkpd), rail, R, 1:n, side, a, b, R of the main track, the parts of a slip, km and number, catalogue or measured; recorded as they are placed on a straight, in a curve (one-sided when diverging to the side the curve turns to), as a double slip, and when their geometry is replaced or flipped; the switch panel shows the kept type and the R of the diverging track bent with the main one, with the number, rail and km to edit (km from the kept horizontal alignment); the speed check of a diverging track takes its R from the kept type; records follow renamed switches and go with removed ones on save; editor records stay out of the terrain files (.txtf), and those written there by hand go with them into .btf; the side of the diverging track shown as seen; self-test commands for placing switches, the kept switches and the .btf conversion; Polish translation
2026-10-11 21:33:27 +02:00
maj00r
572daeb274
feat(editor): the horizontal alignment designed in the route design kept in the scenery as //$h lines: its vertices and the elements they make (straight, transition, arc, with the radius at the start and the end and the cant), so the paths laid by it are known again without guessing from their curvature; a curve read from the paths takes the radius, the transitions, the cant and the compound arcs of the kept design when its paths lie on it within 2 cm, the other way round too; the whole line design taken back when the fragment has its ends; a curve redesigned alone taken into the line it belongs to; km of the start kept with the design and carried on to the vertical profile of the same paths; paths which no longer follow the kept design shown in the route window, with the kept design to take or to forget; self-test commands for the route design and the kept alignments; Polish translation
2026-10-11 21:33:27 +02:00
maj00r
f0ccd375a0
feat(editor): a switch joined to a track goes along with it as a whole when the gizmo moves, turns or tilts the track
...
The switch, with the switches joined to it, keeps its shape and one grade over its whole length: it is moved,
turned and tilted to the end of the track, and the tracks at its other ends follow it.
2026-10-11 21:33:27 +02:00
maj00r
fe9d78b172
fix(editor): a switch takes the cant set by the gizmo on a track joined to it
...
Canting a track at its joint with a switch cants the whole switch, its diverging path goes onto the new cone,
and the tracks joined at the other ends of the switch follow it and take the cant at their joints.
2026-10-11 21:33:27 +02:00
maj00r
c722e4e419
fix(editor): the gizmo keeps the diverging path of a switch on the surface of its main path
...
The diverging path p3-p4 takes its heights, grades at the ends and cant from the main path p1-p2 (the cone of
its cant) after every gizmo change: grade and cant rings, moving an end and editing a control vector. The tracks
joined to it follow its ends and grades. The grade ring measures along the main path and the gizmo stands in its
middle; the start vector of the diverging path slides along the main one and turns with it.
2026-10-11 21:33:27 +02:00
maj00r
34941822ff
fix(editor): the cant ring works on a control vector, it cants the end of the vector and the tracks joined there
2026-10-11 21:33:27 +02:00
maj00r
a756beb34b
feat(editor): track gizmo rings along the track: direction, grade and cant
...
The rotate gizmo stands along the track. The cross ring changes the grade about the middle or the selected
end, the joined tracks take the grade at the joints; the ring along the track changes the cant of the track
or of the selected end, the joined tracks take it at the joints and ramp it. On a control vector the cross
ring tilts it up or down. Ctrl steps by 5 degrees, 1 per mille, 5 mm.
2026-10-11 21:33:27 +02:00
maj00r
b486eb33d5
fix(editor): a track lengthened past 90 degrees goes on as new tracks instead of hidden paths
...
A regular track draws and saves only its first path; the pieces of a lengthened curve past the first
are now tracks of their own, made and dropped while dragging, taken back by one undo.
2026-10-11 21:33:27 +02:00
maj00r
89678ead3e
feat(editor): track gizmo turns, lengthens and edits the control vectors, joined tracks keep the tangent
...
W turns the track (about its middle or the selected end) and a selection of tracks, the joined tracks follow.
E lengthens the track at its free end: a straight stays straight, an arc keeps its radius, cant and grade.
The gizmo on a control point moves, turns or lengthens the vector; the control point of the track joined
there turns with it, at a switch the vector only slides along the switch. Straight neighbours dragged along
keep their tangents and become straight again when nothing bent them.
2026-10-11 21:33:27 +02:00
maj00r
2beae15390
feat(editor): laying with no ground under the cursor takes the height of the ground around
...
- with nothing under the cursor the height is the mean of the ground found on the nearest ring around the point, 10 to 400 m out, plus the depth of the ballast, instead of 0; the ray of the cursor meets that height
- the ground under the cursor is looked for up to the height of the camera, not only 50 m over the last point
2026-10-11 21:33:27 +02:00
maj00r
0f3004a64c
fix(editor): no crash laying track with the mouse outside the window
...
- with no position of the mouse the ray gave NaN and the ground under it was looked up in a grid cell out of range; the lay and drag tools keep the last cursor then, the ground is not asked about points which are not numbers
2026-10-11 21:33:27 +02:00
maj00r
6284f4e0d3
feat(editor): laid track follows the ground between the clicks
...
- the height along the new track is a smooth curve through points on the ground under the foot of the ballast, added where the track would hang or sink more than 0.1 m, at least 10 m apart; the paths are cut there, each joint keeps one grade on both sides
- the clicked ends and the free ends joined keep their height and grade as before; no grade limits
- self-test layclicks: how far the foot of the ballast goes over and under the ground along the paths laid
2026-10-11 21:33:27 +02:00
maj00r
cfc2b2c64a
feat(editor): laid track stands on the ground with the foot of its ballast
...
- each click of the lay tool and the end of a drag out of a free end take the height of the ground under the lower foot of the ballast plus its depth, the rails never under the ground at the axis
- heights between the clicks follow a curve which keeps the grade of the track laid from at the joint and leaves with the grade of the chord, onto a free end with the grade of that track; no grade limits
- the cursor follows the ground along its ray instead of the level of the last point
- self-test layclicks: heights of the ground and the track, grades and grade breaks at the joints
2026-10-11 21:33:27 +02:00
maj00r
3a549e76a9
feat(editor): Shift no longer forces a straight while laying
...
- laying, dragging out of a free end and the curve of a switch go on with the shape chosen; a straight is the straight layout on Shift+wheel, at a diverging end of a switch it also stops the crossover
- hints without Shift: straight
2026-10-11 21:33:27 +02:00
maj00r
55bb48e8bd
feat(editor): laying from the ground goes on like laying from a free end
...
- the second click of the lay tool lays a straight from the first point and goes on from its end, each next click lays the shape chosen (arc then straight, straight then arc, arc through the cursor, straight) with the radius on Ctrl+wheel, as from a free end; no polyline of vertices cut into pieces of the longest path any more
- a track started on the ground and ended at a free end is the shape pulled out of that end towards the start point, one path per up to 90 degrees of arc
- hints and readout the same for both; self-test command layclicks
2026-10-11 21:33:27 +02:00