60f34fd6bf
Fix the calls of track_rails path functions hidden by the TTrack members of the same names
2026-10-31 20:09:22 +01:00
1ad6d8b2bd
Merge remote-tracking branch 'origin/feat/track-uneven' into feat/renderers-cleanup
2026-10-31 19:52:29 +01:00
154c42cb66
Merge remote-tracking branch 'origin/feat/track-uneven' into feat/renderers-cleanup
2026-10-31 19:13:23 +01:00
maj00r
2b8d7d7cf3
refactor(track): what goes with unevenness in one place, readable
...
The rules stay in TrackUneven.h with no dependence on the engine, as they can
be tested. Their use on the tracks moves out of Track.cpp to TrackUneven.cpp,
split into steps: the group of switches, the values of its paths, the meeting
of two ends. One set of helpers for the paths of a track takes the place of
the same conditions written out in several places, and the value at the ends
of a switch is worked out in one place. The clatter of an axle leaves the long
Update of a vehicle. The fields in the editor say themselves when they show.
No change in behaviour.
2026-10-31 19:05:56 +01:00
maj00r
371de52342
fix(track): what the review of unevenness found in the engine
...
- A path of no length gave a joint with a vector across of NaN to the path
joined to it, on any scenery, with unevenness or not. It now has no
vector across, and so makes no joint.
- Axles no longer stray along the track. It moved vehicles against each
other, changing the distance their couplers go by.
- The bend under an axle goes straight on past the ends of a path: the
polynomial ran off on a short curved one, with a kick in the cab shake.
- A track left out of its rail run, where tracks are joined one way only,
no longer walks the whole run again on every call.
- The clatter of an axle goes by the outer axle on its side of the vehicle,
and not always by the same one, as the two can be on different tracks.
- A vertex works out the amounts once, and the foot of the ballast not at all.
2026-10-31 19:02:55 +01:00
maj00r
ec2d226688
fix(editor): the uneven attribute is written in the layout of the entry it goes into
...
Its numbers go by position, and the positions differ between a plain track
and a switch. A switch made in the style of a plain track wrote them in the
layout of the plain one, so they were read back as other values: the up and
down part as the value of the path p3-p4, and so on.
The values are now one struct with pure functions to read, write and resolve
them, which replaces eight fields and which the unit tests can reach.
2026-10-31 18:58:20 +01:00
24b805b348
Merge remote-tracking branch 'origin/feat/track-uneven' into feat/renderers-cleanup
2026-10-31 18:53:48 +01:00
maj00r
02abc7df0a
feat(track): all of the unevenness in one attribute, with values for each path of a switch
...
Usage, before endtrack, in mm, 0-100, separated by semicolons with no
spaces:
a plain track: uneven value;up;side;cross;dip
a switch: uneven p1-p2;p3-p4;up p1-p2;side p1-p2;up p3-p4;side p3-p4
uneven 18 the value alone
uneven 18;;;25;6 with its own cross level and dip at the joints
uneven 0;;30 sideways alone
uneven 14;35 a switch, 14 on the straight path, 35 on the diverging
What's left out takes the first number, the dip goes by the up and down
one, and a path p3-p4 with no numbers of its own takes those of p1-p2.
This replaces unevenup, unevenside, unevencross and jointdip. The fields
in the editor stay, track panel, section Ride and sound.
At the end they share, the paths of a switch keep to the lower value, and
each comes to its own value along the way. Joined switches take the lowest
of the same path, a path joined to another path the lower of the two, and
a plain track comes to the value of the path it meets. See
track_uneven_doc.md.
2026-10-31 18:33:35 +01:00
maj00r
88609a1657
fix(track): the ends of joined paths meet, in place and in cant
...
Ends less than 20 cm apart meet in the middle with a common vector
across, which closes the cracks from coordinates that don't match in the
data, on tracks with no unevenness as well. At such a joint a switch takes
the cant of the plain track, and alike ones meet halfway: the slips on
Baltyk had steps of 0.2 degrees. The physics goes by the same cant.
2026-10-31 18:31:28 +01:00
maj00r
3dbe8a75f8
feat(track): the foot of the ballast stays on the ground as designed
...
Rails, sleepers and the top of the ballast go with the unevenness, the
slope of the ballast takes up the difference.
2026-10-31 18:27:19 +01:00
maj00r
6aed9ec5bd
feat(track): vertical unevenness comes near its limit more often, with longer buckles too
...
Fewer short waves: at uneven 18 the humps over 12.6 mm on the 10 m chord
go from 28 to 38 per km, with the peak still at 18 mm. Waves of 47-83 m
join them. They hardly count on that chord, the body rises and falls on
them.
The documentation tells how far unevenness goes before a pantograph
can't keep up. A wire rising fast enough trips the main breaker on a
straight track too: it does at tor0290 on Baltyk, over about 46 km/h.
2026-10-31 18:25:16 +01:00
maj00r
e74bbf951f
fix(track): the cross level of an uneven track goes by the place, not by how it was laid
...
Tracks laid towards each other settled to opposite sides: a step of cant
of twice the value at their joint, in the geometry and under the axles.
It's now a tilt of the plan, which reads the same from either track.
2026-10-31 18:23:19 +01:00
0bc29af650
Merge remote-tracking branch 'origin/feat/switch-fastenings' into feat/renderers-cleanup
2026-10-31 17:13:45 +01:00
maj00r
e5266e1e6b
feat(track): track unevenness declared in the track entry
...
Usage, optional attributes of a track entry, before endtrack:
uneven <mm> peak deviation of a rail on a 10 m chord, 0-100; normal and switch
unevenup <mm> up and down alone, instead of uneven; normal and switch
unevenside <mm> sideways alone, instead of uneven; normal and switch
unevencross <mm> cross level alone, instead of uneven; normal only
jointdip <mm> depth of the dip at rail joints, every sound distance; normal only,
default 0.4 of the up and down component
Values of uneven follow PLK Id-14 appendix 1: 6 mm is the limit at 160 km/h, 10 at 120,
18 at 80, 35 at 40; half of it for a track in a good state. Example:
uneven 18
unevencross 25
jointdip 6
endtrack
The same fields are in the editor, track panel, section Ride and sound. See
track_uneven_doc.md.
The unevenness is a displacement field over the plan of the scenery, with no random
numbers: one place strays the same every time, and joined tracks, the paths of a switch,
sleepermodel and axles at one place move together. Tracks meet at a joint at the lower of
their values. Joined switches take the lowest of theirs, the tracks joined to them come to
it, and a track with none of a component keeps the switch to its design in it. The clatter
comes from the dipping joints. Curve radius and grade for the physics stay as designed.
Tracks with it get geometry every 2 m on straights: 4x the vertices on Baltyk with all
tracks flagged, 0.2 ms more per frame on td.scn.
2026-10-31 15:47:10 +01:00
765153ad91
Merge remote-tracking branch 'origin/feat/switch-blades' into feat/renderers-cleanup
2026-10-29 23:55:04 +01:00
maj00r
80379b991c
feat(editor): the work of the editor sessions not committed yet, as it stands: a curve traced on from the end of the diverging track of a switch goes on at its radius with no transition in, or from a straight right at the switch (alignment start_held, fit_going_on), the plan taking an end adjoining R 10 km or more for a straight; the switches and slips laid into curves, slid along them and laid alone on one straight (frame_path, switch slide); the route plan reading curves going on from the tracks adjoining, the kept designs taken or forgotten; the orthophoto and terrain model settings, downloads and layers, the tracks onto the terrain; the curvature of a path in the plan (bezier::plan_curvature); the Polish texts of all of it. Not built as committed
2026-10-29 22:19:06 +01:00
maj00r
c353435cc1
fix(track): a path with its radius given is a curve however gently it bends, it isn't straightened as it's loaded: a path whose control vectors lay within 2 cm of where a straight has them was laid as a straight, a short one bent with a gentle curve too, as the 9.44 m of the main track of a switch of a slip bent into a curve of R 800 m, whose diverging track kept its curve: the two tracks of the switch 14 mm apart where they're one, the blades of a side of the slip shaped from 0.354 m, of the other side not at all. Plain tracks, switches and the pieces of their paths alike; one with no radius, as a straight given its control vectors along it, is straightened as before. Selftest bladetips: a Rkpd 49E1-190-1:9 bent into R 800 m and R 4000 m with the blades of all four switches from 1.248 m, as on straights
2026-10-27 19:21:50 +01:00
maj00r
6533914024
fix(track): the blades of a slip laid in the editor are shaped from their templates as the ones of a switch are, from the tip where their planed nose ends, so they start where the view marks the tips of the blades and the drive stands, not at the joint before them: the crossings of the diamond the blades end short of were looked for only among the tracks with their rails cut, which the simulator never cuts, so the slips kept the blades laid from the start of the switch. They're found now among the tracks with their rails whole too, for the blades of a slip only. Selftest bladetips: the blades of the four switches of an Rkpd 49E1-190-1:9 from 1.248 m to 7.55 m, as the drives; Rz 60E1-300-1:9 unchanged, 1.5 to 12.69 m
2026-10-27 19:21:40 +01:00
82d3842495
Load catenary node entries from included scenery files reliably
2026-10-27 01:04:22 +01:00
maj00r
476909581f
fix(track): two switches laid right after one another, with no plain track between them, are joined, the vehicles no longer derail there: only the plain tracks looked for their neighbours, so the end of the main track of one switch at the start of the next one was joined to nothing, and an axle getting to it ran onto a track made to derail it. TTrack::join_switches joins the free ends of a switch to the ends of other switches in the same points, on both sides, with the codes of the ends the axles go on by: the end of either path of one at the start of the other, two facing at their starts, two meeting at their ends; done once the plain tracks are joined as the scenery is loaded, the old sceneries too, and as the editor joins a switch laid. Selftest pathwalk walks the tracks as an axle does: P2 to P1, P4 to P1, start to start and end to end go through either way
2026-10-26 20:40:51 +01:00
maj00r
3b43c71dbb
feat(track): the blades of the switches laid in the editor shaped from their templates with the frogs still whole: the blades alone are on (track_features::blades), the rails cut at the frogs, the wing and the check rails stay off. A switch with the key frogs draws its blades from the tip where their planed nose ends to the heel, bent as they're thrown, the rail behind them from the heel on, where they were laid from the start of the switch before; on a switch of the catalogue they start at the cut tip of the tables, 1.248 m from the joint at R 190, 1.5 m at R 300. The plain track a blade of a double switch runs on into starts its rail behind the heel. The switches without the key, laid by other tools, and the ones of a double slip, whose blades end short of crossings found only with the rails cut, keep the blades they had. The paths the vehicles run on don't change
2026-10-26 20:40:28 +01:00
e19c788f30
Catenary as plain node entries in scenery files
2026-10-26 20:23:26 +01:00
d794b1e736
Catenary editor: keep catenary parts out of node editing, pick and drag anchor poles
2026-10-26 19:51:15 +01:00
5f93c7c20d
Catenary editor: save the catenary by the active layer
2026-10-26 18:56:28 +01:00
550d47e97c
Merge remote-tracking branch 'jano211/siec-radio' into feat/renderers-cleanup
2026-10-26 16:36:36 +01:00
Claude
619f048f31
Sieć trakcyjna: kotwienia, kotwienie środkowe, parasole i wysięgniki rozstawione, konsole 4890/4690
...
Sam kod exe z gałęzi siec-trakcyjna od poprzedniego commita (bez testów, notatek i danych z tests/catenary).
Dane (data/traction_*.txt) leżą poza repozytorium.
- kotwienia ciężarowe i stałe (0404/0405, przewody zakotwione osobno, sieci bez własnych danych: network <symbol> as <kod>)
- kotwienie środkowe 0406/0408/0418/0416: lina, V i zaciski na linie nośnej liczonej jak przęsło, obejma 4160 na teownikach
- parasole i wysięgniki rozstawione na konsolach 4890, wysięgi pomocnicze 0167 na belkach 4690, trzeci wysięgnik w osi słupa,
lina nośna z innego wysięgnika (messenger_from)
- przęsła w nietypowych sytuacjach nie przechodzą na stary wygląd (bez Y, bez wieszaków, lina nad przewodem)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01GfTogWDsfCE8RGFGvm2eyp
2026-10-26 01:12:06 +01:00
maj00r
79a8c13586
fix(editor): a track bent by its second control vector is drawn bent: the straightening of a straight with control vectors (world/Track.cpp) checked the first vector twice, so with it left along the straight the second one, dragged with the gizmo, changed the data but not the track drawn; now a straight only where both vectors lie along it or aren't given. A track bent by hand into an S between two points dragged is labelled with its length (L 77 m), not with a radius of many kilometres read off it; the "K: split here" by the cursor isn't shown while a point is dragged; Ctrl+Z takes away the warning by the cursor of what it took back (the paths that left the kept design). The tutorial clips of editing recorded again: selecting and fixing without the gizmo (a joint dragged, the warning read, Ctrl+Z), and the new one of editing with the gizmo (Q, a control vector dragged bending the track, W, E)
2026-10-25 12:57:23 +01:00
maj00r
e43863932d
feat(editor,track): a cant ramp of its own, off the transition curve: each end of a curve may have its ramp moved and of a length of its own (ST-T1-A6 9.6 pkt 5 and 11), on the straight before the curve or on the arc, the transition keeping the full cant all along, as a switch laid on it wants it; set in the plan under "Cant ramps", stored with the vertex as "ramps", reversed with the curve, marked across the track in the view. The cant of a line is a profile along it now, the paths cut where a ramp of its own starts and ends, their rolls following it, warnings where a ramp is shorter than its cant asks for or reaches into the curve before, past the line or over the other ramp. A switch on a cant ramp is drawn following it: its rails, blades, frogs and bed made at the mean of its rolls, as before, are turned along each path to the roll of the path there, so it no longer steps at its ends against the tracks either side. The checks of a switch laid into a curve warn of the values of table 11.9 in brackets as of the others, with no word of a consent. Unit test of a ramp moved onto the straight
2026-10-25 00:54:50 +02:00
9b7d02e5fb
Vulkan: scene rendering (D1–D7) on a scene walk shared with GL (N6a, N6b)
2026-10-24 20:10:24 +02:00
maj00r
2d7eb966df
fix(rails): the points of obtuse crossings on short tracks planed as on long ones: two rails only go on from each other across a joint less than 2.6 degrees apart, not the knuckle and the point whose ends lie within 5 cm at a slip centre (1:9 is 6.4 degrees); the flangeway of a rail around keeps ours out 1 cm past its ends, over the gap of a joint; a point beside its knuckle always keeps the gauge side of its head, whichever track of the crossing it lies on
2026-10-24 03:04:10 +02:00
maj00r
f36fa81fd1
fix(sleepers): the fastenings of the rails at the obtuse crossings of the slips: the rails and check rails along a timber each with its foot over the foot of the one beside, with a check rail between two of them, in one fastening stretched under them all, a check rail where a rail lies being that rail; of the rails close beside one another, as of a frog, two in a fastening of both only where its ends reach them both, else each in a plate of its own; a check rail on a fastening holding all the rails over it seated for the checkseats selftest
2026-10-24 02:19:03 +02:00
maj00r
540dae420f
fix(sleepers): the timbers a switch shares with a track with no model of timbers of its own laid of the model of the switch, not of the one of eu07.ini without the fastenings: the model of a track with none of its own that of the tracks most of its timbers carry with one, and a timber carrying none of them, as under the short tracks between the halves of a slip, of the model of the nearest timber with one up to 1.5 m away; the fastenings and checkseats selftests take the model the same way
2026-10-24 02:18:58 +02:00
maj00r
85b76acca5
perf(sleepers): the instances of the sleepers and timbers of a track sent to the gpu once, as it's laid, and kept there in a buffer of their own; in each pass the runs of them in sight turned by the modelviews of their cells into the instance buffer of the frame by a compute pass, one dispatch and one barrier a pass, and drawn in one instanced draw for each model, part and level of detail, in place of the cpu turning every instance every frame
2026-10-24 01:40:34 +02:00
maj00r
f155956669
perf(sleepers): the rails of each track for the fastenings worked out once and kept until its geometry is made again, it goes far or the crossings change, not again for every track laid around it; the fastenings laid only out to 30 m past where they're drawn, the tracks further out keeping their beams to lay them on as they come near; out past 50 m the tracks laid while the laying in a frame took under 2 ms, the rest in the frames after
2026-10-24 00:23:50 +02:00
maj00r
2e00619d7f
feat(sleepers): the crossings at wide angles laid on timbers: where two tracks cross so wide they're laid as a grid, the one track carries timbers square to it through the crossing, two side by side under each rail of the other, which lays none there; the rail running along the two held on their seam by fastenings as far apart as the beams at most, clear of the fastenings of the rails across; the guard rails of the crossings at wide and middle angles held as the rails beside are, a running rail with its guard rail in the fastening of both, the rails crowding at the corners under one plate; the beams under the guard rails timbers as far as the guard rails reach; the fastenings selftest lists the rails on each timber with detail rails
2026-10-23 23:37:28 +02:00
Claude
f30fefd91c
Sieć trakcyjna: przęsła wg typów sieci, wysięgniki z katalogu, bramki, kotwienia i edytor sieci
...
Sam kod exe z gałęzi siec-trakcyjna (bez testów, notatek i danych z tests/catenary).
Dane (data/traction_*.txt) leżą poza repozytorium.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_019Tqn7T8D1Gx3ptKtZgNtX5
2026-10-23 23:15:00 +02:00
maj00r
997a8da41d
fix(rails): the rail going on from the heel of a blade raised as the blade at the heel and forged down to the plain rail along 0.5 m, no step at the heel; the wing rails made over into the low section by a share of their own along them, the rise apart from it; a fastening holding raised rails, as the plate of a frog under the wing rails and the nose, moved up on a pad as far as the least raised of them, its clips with them, a rail not raised sunk in it, a rail raised more on a pad of its own on it; the fastenings selftest lists the lifts and the pads
2026-10-23 22:00:11 +02:00
maj00r
0513a92bc3
fix(sleepers): the fastening of the rails of a frog, holding more of them than its seats, stretched under them all as the plate of the frog, its ends with the clips past the feet of the wing rails, short of the feet of the rails beside, and not narrowed then; the wing rails no longer lying off its ends with no clip
2026-10-23 21:19:14 +02:00
maj00r
890ebebebd
feat(rails): the wing rails of the low section drawn of its profile, Zu1-60 (60E1A1), not the plain one shortened: below the head the web thickened to 44 mm, the foot 55 mm inwards and 85 mm outwards of the middle, the edges of the foot and the root of the web higher, of the measures of the profile drawn, made over as far as the foot is raised along the forged ends; the end faces of the rails of the same
2026-10-23 21:19:14 +02:00
maj00r
d3aef50257
feat(rails): the wing rails of the frogs of the low section of the blades, as Zu1-60, where the timbers have slide chairs: from 1.5 m before the throat to their ends the foot raised as much as the blades ride, the web shortened, the heads level with the rails beside, forged down to the plain rail along 0.5 m; a wing rail which is the stock rail of a blade too, as in the slips with the blades outside of the diamond, whole along its chairs; the fastening holding only rails raised as much moved up on a pad as wide as it, a raised rail on a fastening with others on a pad of its own
2026-10-23 20:21:13 +02:00
maj00r
153cdc550c
fix(sleepers): the fastenings of a rail part between two carved cuts where the part is laid, not twice as far out: both cuts carry its carved lines, taken once as the rails are laid, by one rule for both
2026-10-23 19:39:07 +02:00
maj00r
9478f69203
feat(rails): the feet of two rails face to face across a flangeway, as a wing rail and the leg of the nose beside it or the two wing rails at the throat, planed off where they'd lie on each other, meeting in the middle of the flangeway as those of two rails back to back do; the heads left whole
2026-10-23 19:24:47 +02:00
maj00r
f7821eea99
fix(sleepers): the wing rails on the timbers as they're bent out: the rails of a track taken in their parts between the cuts at the crossings, as they're laid, a part going on over the gap at an obtuse crossing where its check rail lies; three rails or more close beside held by the fastening of two rails covering the most of them first, then those before and after it, one holding more rails than its seats not narrowed; a rail lying on the brace of a chair beside takes the brace away; a plate cut short at the fastening beside from where its narrowing left it
2026-10-23 19:24:47 +02:00
maj00r
fa62a61389
fix(sleepers): no rail left lying on a timber without a fastening: the stock rails on a plate as wide as their foot between the brace and the slide plate, the stock rails back to back, as the wing rails of the slips with the blades outside of the diamond, on one plate under both; three rails or more close beside one another under fastenings of two rails in turn; a plate lying over the fastening of the rail beside cut short at its edge, as on one plate with it, a rail with its check rail on the fastening of the rail beside in such a plate, not left out; selftests checkseats and the bare rails in fastencheck
2026-10-23 18:25:00 +02:00
maj00r
62f8932f15
fix(sleepers): a rail with its check rail on the side away from a rail close beside, as the outer rails at the acute crossings of the slips with the blades outside of the diamond, in the fastening with its check rail, the rail beside in a plate of its own; a plate still lying over a fastening of more than a plate after the narrowing left out
2026-10-23 17:44:35 +02:00
maj00r
b512460fdf
feat(sleepers): the fastenings fitted on the switches crossing and the double ones: the chair of the model split into its brace and its slide plate, the slide plate from the edge of the foot of the stock rail on, not under it; the plates and the slide plates narrowed where the rails lie close, the fastening of two rails centred between them, a rail lying on the fastening of the rail beside it left without one of its own, the brace dropped where the rail beside comes too close; selftest fastencheck
2026-10-23 17:25:02 +02:00
maj00r
5aedbcdc1b
feat(sleepers): the timbers of a switch get the fastenings of the rails from the submodels plate, chair and check of their model: a plate under each rail where it lies on a timber, slide chairs under the stock rails along the blades, a fastening of both where a check rail or another rail of the frog lies close beside, the legs of the nose in one plate where they're joined; the rails sit on the plate, the blades ride on the slide plates of the chairs as high as the model has them, their webs shortened; the fastenings drawn within 120 m; selftest fastenings
2026-10-23 16:46:58 +02:00
b343e98e22
fix(roads): a level crossing watches the rails within its warning distance measured from where it is, however long the track through it
2026-10-22 18:42:36 +02:00
f4f8c75e49
fix(ai): orders of road junctions and level crossings measured along the lane they lie on, so they aren't misplaced on short lanes
2026-10-22 17:16:33 +02:00
1cc1ba27d2
fix(roads): an axle getting on a crossroads takes the way the other axle took, one starting where it gets on
2026-10-22 16:22:49 +02:00