17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 12:09:19 +02:00

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

This commit is contained in:
maj00r
2026-10-12 03:24:23 +02:00
parent 696168a132
commit f5895abfa8
6 changed files with 250 additions and 46 deletions

View File

@@ -1036,6 +1036,12 @@ editor_mode::selftest_result editor_mode::selftest_track(std::string const &comm
WriteLog("SELFTEST " + command + ": " + m_route.status + " " + m_route.error);
return selftest_result::handled;
}
if (command == "digitizeall")
{
digitize_all();
WriteLog(format("SELFTEST digitizeall: %zu alignments", alignment_store::records().size()));
return selftest_result::handled;
}
if (command == "alignments")
{
auto const &records{alignment_store::records()};
@@ -2471,6 +2477,7 @@ editor_mode::selftest_result editor_mode::selftest_terrain(std::string const &co
// routevertex <i> <R> <L in> <L out> <cant>, routearc <i> <R> <L> <share>, routeshare <i> <share>, routekm <km>
// routeapply, routetake as the buttons of the route design do it
// alignments logs the alignments kept in the scenery and the element under each path
// digitizeall every line not digitized yet kept in the scenery, as the button of the route design does it
// splitkind <kind>, nudgekind <kind> <dx> <dz> the first path over an element of the kind split in two, or moved
// switchplace <template> <x> <z> <direction> <side> the catalogue template whose label starts so put into the straight
// nearest the point, or into the curve (switchcurve); slipplace <template> <x> <z>