17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-08 14:59:43 +01:00

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

This commit is contained in:
maj00r
2026-10-29 22:19:06 +01:00
parent 2eda26b94c
commit 80379b991c
49 changed files with 4718 additions and 1114 deletions

View File

@@ -680,7 +680,9 @@ std::optional<editor_track::bend> editor_track::bend_at(TTrack const &Neighbour,
result.direction = glm::normalize(chord) * sign;
return result;
}
bezier const curve{path};
// on the piece at the end where the path has them: the path only approximates them, its curvature off at its ends, R 300.9 at
// the end of the diverging track of a switch of R 300
bezier const curve{path.pieces.empty() ? path : atend ? path.pieces.back() : path.pieces.front()};
auto const first{curve.first(atend ? 1.0 : 0.0)};
auto const second{curve.second(atend ? 1.0 : 0.0)};
auto const speed{std::hypot(first.x, first.z)};