17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-31 23:59:03 +01:00

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.
This commit is contained in:
maj00r
2026-10-21 17:34:19 +02:00
parent e86a536a9d
commit 62b0e925a7
4 changed files with 62 additions and 2 deletions

View File

@@ -201,6 +201,15 @@ editor_mode::selftest_result editor_mode::selftest_join(std::string const &comma
m_lay.mouse_snap = editor_track::find_free_end(nullptr, 1, point, 3.0, {});
m_lay.mouse = m_lay.mouse_snap.track != nullptr ? point : lay_bed(point);
WriteLog(format("SELFTEST layclicks ground %.3f, track %.3f", point.y, m_lay.mouse.y));
if (false == m_lay.points.empty())
{
auto points{m_lay.points};
points.push_back(m_lay.mouse_snap.track != nullptr ? m_lay.mouse_snap.position : m_lay.mouse);
m_lay.preview = lay_pieces(points, m_lay.mouse_snap, m_lay.preview_length, m_lay.preview_error);
auto readout{track_readout()};
std::replace(readout.begin(), readout.end(), '\n', '|');
WriteLog("SELFTEST layclicks readout: " + readout);
}
lay_click();
WriteLog(format("SELFTEST layclicks %.1f %.1f: %s", point.x, point.z, m_lay.status.c_str()));
}