17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-26 21:44:53 +01:00
Commit Graph

3529 Commits

Author SHA1 Message Date
maj00r
5ecb6ebe00 feat(editor): the kilometrage tool sets the km of the railway lines, points where the km is known and jumps of the km, the rest along the axis of the line, between the tracks of a double-track one and along the longer track where they run apart, kept in the scenery as //$k lines
The track mode Kilometrage (X, under More) puts a point of the km where a track is clicked: the line, the km and, at a jump,
the km on from it. The axis of a line follows the main paths of the switches through the tracks of its points; on a
double-track line it runs between the tracks, and where they part on formations of their own and come together again it
runs along the longer one, the shorter one going by its own length with its last hectometre before they meet taking up
the difference (PKP GK-1 6.1.12). The km between the points are stretched to the length of the scenery evenly; the panel
lists the points with the stretch, the 3D view shows the axis, a tick at each hectometre, the points with their km and
the km of the lines by the mouse. Read the km from the posts turns the hectometre posts along the line into the points
of its km, a jump where two runs of numbers meet, and warns of a jump on a curve or at a station (Id-1 § 19). Each change
is a step of undo.
2026-10-22 13:27:37 +02:00
maj00r
8fde4dc843 fix(editor): the readout of a straight dragged beside another one writes the arrow as ->, the font of the interface has no arrows and showed a question mark 2026-10-22 13:27:29 +02:00
maj00r
f287ecf840 fix(editor): the signalling mode places the joints and the signals as Ie-4 gives them, a branch joint 4.2 m beyond the fouling point, the joint a main signal drops at 15 m beyond it, the block sections no shorter than the braking distance of the line and the warning discs that far out
The block signals are numbered after the nearest hectometre of their parity ahead of them, and two signals no longer take one spot between the tracks.
2026-10-22 12:34:53 +02:00
maj00r
2b40a36173 feat(editor): the switch numbering of the signalling mode renames the switch in the objects of the scenery naming it, as the lanterns of the switches 2026-10-22 12:13:22 +02:00
maj00r
46e665c468 feat(editor): the signalling mode sets the signals of the lines out of a station, the automatic block signals and the block sections to the next station on a double-track line, a warning disc before the entry signal on a single-track one
The station keeps its km and the direction of its numbering in its record. The block signals are named after their km, odd on track 1 and even on track 2, the sections after the signals at their ends, and each signal gets the control of its section.
2026-10-22 12:13:22 +02:00
maj00r
e230544987 feat(editor): the signalling mode names the signals in the scenery above their lamps, the names shown within 700 m only, and draws the track circuits wider in the top view 2026-10-22 11:40:38 +02:00
maj00r
c50d412bc4 feat(editor): the signalling mode shows the track circuits in the scenery, the tracks in their colours, a bar across them with a post at each joint and the names of the station tracks 2026-10-22 11:21:59 +02:00
maj00r
8f8a1518b7 feat(editor): the signalling mode places the signals of a station and names them as PKP PLK does, the entry ones out on the lines with the circuits before them, the exit ones at the ends of the station tracks, the shunting ones at the shorter tracks, and renames the signals standing in their places 2026-10-22 11:07:58 +02:00
maj00r
21d7a0e94a fix(editor): a track with its track circuits changed is marked for the save, the circuits the signalling mode set without cutting the track were lost from the saved scenery 2026-10-22 11:07:58 +02:00
maj00r
f5d2ae7569 feat(editor): the signalling mode numbers a station track as a whole through the switches along it, keeps the numbers the tracks have when set again, renumbers the selected track and labels the schematic without one label over another 2026-10-22 10:41:11 +02:00
maj00r
c8f3039a8c feat(editor): the signalling mode cuts a station at the joints of its track circuits and names them, a circuit for each switch and one for each stretch of a station track, the tracks numbered as PKP PLK does 2026-10-22 08:16:39 +02:00
maj00r
5044beb380 feat(editor): the signalling mode numbers the switches of a station along it and names them after its code, the drives and the switch records follow, and an undo of names passed round among the tracks leaves the drives right 2026-10-22 07:50:59 +02:00
maj00r
8c5795348f feat(editor): the signalling mode finds the station of a switch, lays it out as a schematic along its main track and keeps its name, code and line in the scenery 2026-10-22 07:35:31 +02:00
maj00r
7fb9d2d458 fix(editor): the whole-scenery grade fit takes spans a few metres apart for one bridge, leaves the culverts on the embankment and ends a bridge at a joint by its abutment
Bridged stretches less than 5 m apart are merged into one bridge on its piers, and those shorter than 3 m, a ditch or a
culvert under the embankment, are no bridge. A bridge end within 1 m of a joint of the route or a break of the line moves to
it, so the cut leaves no sliver of a path by the abutment. Against the OpenStreetMap railway bridges the marked share stays
the same (lk91 60 of 66, TG 90 of 104); the places with nothing under them in the map fall from 6 to 4 on lk91 and from 18
to 12 on TG, and the bridge paths shorter than 1 m from 9 to 0 and from 11 to 1.
2026-10-22 05:56:05 +02:00
maj00r
0d9fa6337d feat(editor): the whole-scenery grade fit sets the tracks over a bridge or a viaduct to the bridge environment
Where the terrain model falls away under a fitted line by the abutments, the paths are cut off at the ends of the stretch as the line is applied and set to the bridge, in the same step of the history: they sound as on a bridge, get no formation and the terrain under them stays as the model has it, also after the scenery is saved and opened again. Tunnels and tracks set to the bridge already are left as they are. The status says how many paths went on a bridge.
2026-10-22 02:45:19 +02:00
maj00r
f361bc406b feat(editor): the whole-scenery grade fit keeps the tracks a station shares at one height, lets the switches lie on the vertical curves the regulation allows, runs straight through the double slips and leaves the bridges out of the faults
A switch may lie on a concave vertical curve, and on a convex one no sharper than 2000 m (Dz.U. 2026 poz. 1225 § 58 ust. 16): the fit bends over the switches and their shared timbers where the ground does, a curve on a switch is a warning, and only a sharper convex one an error. A sharp crest of a hump keeps its curve off the switch zones. The zone of a crossing reaches only as far as the path crossed has rails, so the middle of a double slip keeps to itself.

A line runs through a switch along its main path, and through the quarters of a double slip straight on, so the long lines go through the slips and the connections between them are fitted after. Rails of the lines fitted already nearer than a sleeper is long are taken at their height, as both lie on the same timbers. A short line between two lines whose end grades can't be joined within the norms keeps only the heights of its ends, and the grade breaks at the joints. The norms speed of a line is the one most of its length is laid for, so a few tracks set much faster don't stiffen the curves of all of it.

The fault finder leaves out the places over the terrain model on a bridge or a viaduct, the ground falling away under them by the abutments. A formation modifier may be open at its start or end.
2026-10-22 01:48:04 +02:00
maj00r
9fedbaf6a8 feat(editor): the design speed the norms lay for is shown by the cursor with the track it comes from, and can be the one set for the laying
Laid to the norms, the readout says the design speed of the transition curves and of the cant: that of the track the laying goes on from or joins, or the one set for the laying. A new option takes the set speed also on from a track with its own, the new tracks get it; Ctrl+Shift+wheel steps it while laying and turns the option on. The panel shows the speed the laying under way is designed for.
2026-10-21 20:28:34 +02:00
maj00r
415c7484ec feat(editor): laid to the norms, a track laid on from an end gets its transition curves, into the arc, between the arcs of a compound curve and out to the straight
A track laid on from a free end in the PKP PLK laying, by a drag out of the end, by clicks from it or laid back onto it, starts from the curvature and the cant the end has. An arc turning the same way as the end is a compound curve: a transition of the norms ramps the curvature and the cant from the one arc into the other. From a straight the arc gets its entry transition, the arc then straight its exit one. Where the way is too short the transitions are cut and the cant lowered to what they ramp, and the readout says so; with no room at all the track is laid as before and the note says why. The curves traced on the orthophoto and the recommended values of a compound curve get the transitions between their arcs too. The free laying stays as it was.
2026-10-21 19:51:56 +02:00
maj00r
5764b328be feat(editor): a curve of the plan traced on the orthophoto, the points clicked along the track give its radius or the radii and the shares of a compound curve 2026-10-21 18:54:14 +02:00
maj00r
21595ba010 feat(editor): the tracks are laid to the PKP PLK norms unless the free laying is chosen, asked as the laying starts
The free laying isn't the default any more. The first time a session opens the laying or the plan, a window asks how the
new tracks are laid, with the two cards of the panels (the norms marked as chosen); a click on one of them takes it and
closes the window, which comes before the offer of the terrain model of a new scenery. "Remember the choice, don't ask
again" keeps it in eu07_editor.ini (track_norms ask, free or plk), and a choice kept follows a later click on the cards of
the panels; the settings of the editor (General) choose between asking and either way. The self-test scripts start with the
free laying, as they were written for it.
2026-10-21 18:23:49 +02:00
maj00r
79642a95c7 feat(editor): a measuring tape in the track mode, M: the distance, the difference of height, the grade and the azimuth between two clicks
M in any tab of the track mode turns the tape on: a click puts its start, the next one its end, at a free end, on the axis
of the track under the cursor or else on the ground. The readout at the cursor gives the distance in plan and in space,
the difference of height and the grade between them and the azimuth, while the second point follows the cursor and once
it's put; a further click starts a new measure, M or Esc puts the tape away. Self-test command tape.
2026-10-21 17:57:05 +02:00
maj00r
8171bdc7d5 feat(editor): zoomed in from above, the curves are labelled with their radius and length and the switches with their name and type
In the top view at a metre a pixel or closer, each curved track of 5 m or more gets "R 600  L 120" by its middle and each
switch its name and its type from the kept switch record ("Rz 60E1-300-1:9 P") by its start, on a dark plate as on a plan.
A label which would cover another one is left out, the switches going first and then the sharper curves. View > Track labels
in the top view switches them off.
2026-10-21 17:51:45 +02:00
maj00r
6a5f0d735d feat(editor): the tracks of the track mode can be coloured by their radius, speed or grade, with a legend
View > Track colours draws the rail tracks over the view in bands of the radius of their paths, of their speed or of the grade
along them, from above over the whole view and in the 3D view within 1.5 km of the camera, with the legend of the bands in
the bottom right corner. Plain keeps the lines of the top view as they were. Self-test command trackcolours.
2026-10-21 17:47:42 +02:00
maj00r
27ea2a7456 feat(editor): the joints of the tracks just changed are checked at once and their faults marked in the view
After a change of the tracks, once the mouse is let go, the joints check looks at the joints of the tracks changed and of
the tracks they join, with the limits of the Joints panel: ends almost meeting, steps, kinks, jumps of the cant and of the
grade get a marker with the value in the view while the panel is closed, and go away once a later change or an undo puts
them right. The check of a track is shared with the panel (joints_check takes the list and the pairs seen), the pairs
already looked at are kept by the tool instead of a global. Self-test command jointslive.
2026-10-21 17:41:51 +02:00
maj00r
d0ff7be1c2 feat(editor): the fields of the features switched off in the build are shown greyed with the reason instead of hidden
The frog, movable nose and 3D sleeper and timber fields of the track properties and the frog chips of the switch panel stay
in place while track_features::crossings or track_features::sleepers are off, greyed, with a tooltip saying the feature is
switched off in this build; nothing changes them, copying and pasting the properties leaves them out.
2026-10-21 17:34:41 +02:00
maj00r
4db3dd70d3 feat(editor): the free ends of the tracks are marked red in the track mode
Each end of a rail track joined to nothing, where a train would run off, gets a red dot next to the white dots of the joints,
in the 3D view near the camera and from above over the whole view. The ends are looked for again after an edit or once the
camera leaves the place they were found for, not every frame.
2026-10-21 17:34:36 +02:00
maj00r
a154fce67b feat(editor): the data of a track under the cursor give its grade there and its cant, and the radius of a curve without one written
After the cursor rests on a track, its label gives the grade at the place pointed at and the cant of the path, besides the
name, the length, the radius and the speed; a curve whose radius isn't written in the scenery gets the one of its geometry
instead of being called straight.
2026-10-21 17:34:26 +02:00
maj00r
62b0e925a7 feat(editor): the readout of a track being laid or led out of an end gives its rise, its grades and the speed of its arc
Next to the length and the radius, the readout at the cursor shows the difference of height from the start to the end of the
track about to be laid, the grade along it (one value or the range it goes over) and the speed the sharpest arc lets the
trains through at within the cant and the unbalanced acceleration of the laying limits. The self-test layclicks logs it.
2026-10-21 17:34:19 +02:00
maj00r
e86a536a9d fix(editor): a point taken out of a grade line leaves its neighbours with the radius of the limits, and paths meeting at a sharp break keep their own grades
The points of a grade line read from the tracks keep the radius measured there; once a point between them was taken out, the
breaks of its neighbours changed while their radii stayed, so a break without a curve read as 0.4 per mille became one of
9 per mille with no curve, and the tracks took it as a kink. The neighbours of the point taken out follow the limits now,
with the button, Del and the self-test alike (profile_remove_point).

Applying a line with a break without a curve gave the path which ends at the break the grade of the element after it, so
its Hermite heights bowed 0.12 m off the line over 100 m before the break; each path takes the grade on its own side now.

Self-test commands vprofilerun, vprofiledel and vprofileput.
2026-10-21 17:25:17 +02:00
maj00r
d2d06817bc feat(editor): the track laid on the terrain gets its grade line from the profile solver
In place of a line bent every ten metres to keep within 0.1 m of every bump,
the grades and the vertical curves are fitted to the ground the way the
profile fits them. Where the formation is made in the terrain model the line
keeps to the radius of the norms and cuts and fills; over the ground left as
it is it bends as sharply as it has to. The joints keep the height and the
grade of the track joined, no grade is capped and no piece is under 5 m.
2026-10-21 13:20:47 +02:00
maj00r
eea0900928 fix(editor): an arc and a straight laid to a point on the circle of the radius aren't refused 2026-10-21 13:20:47 +02:00
maj00r
a39a3d4dbe feat(editor): the terrain model loads from a clearer panel and follows the tracks edited
The panel gives the place on the map or typed, the area, one main button, a
progress bar with Stop and a banner over the view while it loads. The terrain
grown ahead of a track goes on at the height of the one beside it and skips
the ground made by hand. The formations follow the tracks moved, laid and
removed, in the same step of the history; a whole load is one step, the
ground grown ahead none.
2026-10-21 13:20:39 +02:00
maj00r
0f9b00c74a feat(editor): a map of Poland to pick a place on, shared by the scenery wizard and the terrain model 2026-10-21 13:20:25 +02:00
maj00r
6f25290eee feat(editor): the terrain model asks again for what it didn't get, can be stopped and says when the place is outside Poland 2026-10-21 13:20:20 +02:00
maj00r
da18883558 feat(editor): what the editor refuses shows by the mouse cursor
An error put in the status bar also shows for 4 s by the cursor, and the
refusals the tools kept in their panels (a curve which can't be laid,
a switch which doesn't fit, a signal which can't be moved, a drive
without the variant) go there as well.
2026-10-21 11:47:26 +02:00
maj00r
9d27fd1ace fix(editor): a straight dragged by its free end past a curve isn't refused
When the refitted curve needed more of the straight at its other end,
the ends of the line were both checked against the design, and the free
end that went along with the drag "missed" by as far as it was dragged.
Only an end whose straight was cut is checked now. The longer transition
curves of the PKP PLK norms ran into it more often.
2026-10-21 11:47:25 +02:00
maj00r
825c91705d fix(editor): the free design gets no transition curves from the Plan tools
Dragging an end of a straight refits the curve next to it with the cant
and the transition curves recommended for the speed, keeping the curve's
own only where it had some; a plain arc laid freely came out with
transitions. Break and S-curve took the recommended transitions too. The
recommendation of a design not checked against the norms is a plain arc
now, the tools take the norms in effect rather than the ones the design
was last computed with, and the Plan panel calls the automatic choice
"None" in the free design. Self-test: norms free|plk.
2026-10-21 11:47:25 +02:00
maj00r
19b7364bca fix(editor): the cant of a path is typed in millimetres
The inspector took the cant as the roll angle in degrees while every
readout shows it in millimetres of one rail over the other.
2026-10-21 11:09:16 +02:00
maj00r
0b74da1474 fix(editor): a radius typed while dragging out of a free end reaches the curve
The shape pulled out of a free end took a typed radius for its curve,
but the typed keys were thrown away while the drag went on, so the value
never got there. Digits now type the radius whenever the shape has a
curve and a straight.
2026-10-21 11:09:16 +02:00
maj00r
ddde8d12d9 fix(editor): Esc takes back what a drag did
Esc in the middle of dragging a point of a track kept the moved point,
and the hint said so; dragging a straight was taken back but left an
empty step in the history; a vertex or the radius grip of a curve stayed
moved in the design. Now Esc puts back what was there before the drag in
all three, and the history doesn't keep a step for it.
2026-10-21 11:09:06 +02:00
maj00r
7da0432dca fix(editor): a signal goes to the other side of the track and turns around
Dragging a standing signal over the track takes it to the other side;
the side used to come from where the signal stood, so it never crossed.
The selected signal gets "To the other side" and "Turn around": the
first mirrors it over the axis facing the same trains, the second turns
it to the trains of the other direction and moves its event to the
other event list of the path. Either one swaps a head leaning to the
track for its counterpart, and an include keeps the template its
directive names, so undo brings the old file back too.
2026-10-21 10:44:58 +02:00
maj00r
87bacede74 refactor(editor): the helpers repeated over the editor files are shared
The name of a node or "(no name)" was written out in twenty places and
four local functions, a lower-case copy of a text in four files, the
test for a number, the file name of a template made comparable and the
heading of a direction in three and two, the green main button of a
panel in five and the key=value parameters of a self-test command in
five. Each of them is one helper now: name_of, tall_button_height and
main_button with the panel helpers, numeric with format, normalized
with the include helpers, heading_of with the plan geometry and
selftest_values with the tools; lower gives way to ToLower.
2026-10-21 10:28:42 +02:00
maj00r
747c6817f0 refactor(editor): the tools get the roles of the editor they need, not all of it
editor_services was growing into one interface every tool depended on
whole. It splits into the roles the editor plays for its tools: the
selection, the view, the undo history, the templates by the track, the
ground with the terrain model, the track design and the guide of the
first steps. Each tool is handed only the roles it uses, so what it
depends on can be read from its constructor; editor_services stays as
the sum of the roles the editor implements.
2026-10-21 10:08:27 +02:00
maj00r
872e1b5e19 refactor(editor): the parallel track is a tool of its own
The seventh tool out of editor_mode. It reads the selected set of tracks
and the tab shown through the services, digitizes the tracks it lays and
refreshes the plan after it sets one parallel to another. The panel shown
for two selected tracks is a public call of the tool, and the self-test
command parallel moves with it and lays the same tracks as before.
2026-10-21 09:54:39 +02:00
maj00r
6ee771bb22 refactor(editor): the hectometre posts and the fouling points are tools of their own
The fifth and the sixth tool out of editor_mode, the two lineside ones
sharing their file. Placing, moving and taking out the templates which
stand by the track become services of the editor, with the template
types of their own, and so do the tab of the track tools shown, the
ground under a point and the first step done. The context menu, the
click on a fouling point in the view and the lineside tabs go through
the public calls of the tools. The self-test commands hekto and fouling
move with them and log the same as before.
2026-10-21 09:50:38 +02:00
maj00r
c45c4713d6 refactor(editor): the trainset is a tool of its own
The fourth tool out of editor_mode. The track under the cursor and the
first steps of the tutorial become types of their own, which the editor
gives to the tools, and a tool shown as a tab of the lineside panel keeps
its open and expanded flags in a tool_tab. The trainsets waiting for the
save are handed to the editor by the tool, which hears back when they
were written. The self-test command trainset moves with it.
2026-10-21 09:44:17 +02:00
maj00r
8ba8345faf refactor(editor): the joints check is a tool of its own
The third tool out of editor_mode. It reaches the terrain model and the
places of the tracks on it through the services, the place of a track
for the terrain model is a type of its own now, and the laying and the
switches ask the tool for the kink it allows. A self-test command can
ask to be run again in the next frame, as the check against the terrain
model does while the model comes in.
2026-10-21 09:23:36 +02:00
maj00r
0c2880f48f refactor(editor): the speed check is a tool of its own
The second tool out of editor_mode. Tools get two more hooks, the overlay
drawn over the view and the options in the tool window, and the editor
gives them the track it focuses on, the node it makes current, the norms
of the route design and the snapshot of the tracks for the undo.

The check gets a self-test command, speedcheck <scope>, which runs it
through and logs the paths found too fast for their geometry.
2026-10-21 09:10:27 +02:00
maj00r
3c9c90b468 refactor(editor): the structure gauge is a tool of its own
The first step of taking the tools out of editor_mode: a tool keeps its
own state and reaches the editor through editor_services, the few things
it needs from it, instead of through every member of the editor. The
editor holds its tools in a list for the hooks they share: a deleted
node is forgotten by all of them in one place, and a self-test command
the editor doesn't know goes to each of them.

The gauge moves with its state, its window and its self-test command;
the ImGui ids and the texts stay the same, and the self-test gives the
same hits on the test scenery as before.
2026-10-21 09:00:59 +02:00
maj00r
a168e2ccfc fix(editor): an undo no longer moves a model which took the place of a deleted one
The states of the objects which followed a track, kept in the history
for the undo, held the pointer of a model after it was deleted. Only the
address was checked before the model was moved back, so a node made
later at the same address, of another type too, was taken for it. The
states of a deleted model are dropped from the history with its other
pointers.
2026-10-21 08:59:54 +02:00