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

fix: structure gauge measured from the rail head, not the rail foot of the scenery points

This commit is contained in:
maj00r
2026-10-04 01:48:11 +02:00
parent f2e727ce9a
commit 208ad3400d
2 changed files with 5 additions and 1 deletions

View File

@@ -51,8 +51,9 @@ gauge_line make_line(editor_track::route &Route)
gauge_line line;
line.samples = editor_track::sample_route(Route, 1.0);
std::vector<double> chainage, curvature, cant;
for (auto const &sample : line.samples)
for (auto &sample : line.samples)
{
sample.position.y += gauge::rail_height;
chainage.push_back(sample.chainage);
curvature.push_back(sample.curvature);
cant.push_back(sample.cant);

View File

@@ -37,6 +37,9 @@ std::vector<profile> default_profiles();
std::vector<profile> load_profiles(std::string const &File);
void save_profiles(std::string const &File, std::vector<profile> const &Profiles);
// the points of the paths in the scenery lie at the rail foot, the gauge is measured from the rail head
double constexpr rail_height{0.18};
// below this height the outline is the limit installation gauge, which leaves the room for the platforms
double constexpr lower_part{1.17};