mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-02 22:06:21 +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:
@@ -709,6 +709,14 @@ std::optional<designed_vertex> vertex_of(std::vector<std::pair<TTrack *, bool>>
|
||||
auto const end{project(r, entering(Run.back(), true), tolerance)};
|
||||
if (false == start.has_value() || false == end.has_value())
|
||||
continue;
|
||||
// the tracks of a part of the curve only, as on either side of a switch laid into it, aren't laid by its design: it's theirs only
|
||||
// where they reach over the whole curve, else they're recognized as they lie
|
||||
auto const low{std::min(start->chainage, end->chainage) - 0.5};
|
||||
auto const high{std::max(start->chainage, end->chainage) + 0.5};
|
||||
if (std::any_of(entry.result.elements.begin(), entry.result.elements.end(), [&](alignment::element const &E) {
|
||||
return E.vertex == *vertices.begin() && E.kind != alignment::element_kind::straight && (E.chainage < low || E.chainage + E.length > high);
|
||||
}))
|
||||
continue;
|
||||
designed_vertex result;
|
||||
result.record = static_cast<int>(r);
|
||||
result.vertex = *vertices.begin();
|
||||
|
||||
Reference in New Issue
Block a user