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

feat(editor): the horizontal alignment designed in the route design kept in the scenery as //$h lines: its vertices and the elements they make (straight, transition, arc, with the radius at the start and the end and the cant), so the paths laid by it are known again without guessing from their curvature; a curve read from the paths takes the radius, the transitions, the cant and the compound arcs of the kept design when its paths lie on it within 2 cm, the other way round too; the whole line design taken back when the fragment has its ends; a curve redesigned alone taken into the line it belongs to; km of the start kept with the design and carried on to the vertical profile of the same paths; paths which no longer follow the kept design shown in the route window, with the kept design to take or to forget; self-test commands for the route design and the kept alignments; Polish translation

This commit is contained in:
maj00r
2026-10-11 16:06:23 +02:00
parent f0ccd375a0
commit 572daeb274
12 changed files with 1105 additions and 5 deletions

View File

@@ -769,6 +769,10 @@ class editor_mode : public application_mode, private editor_track::observer
int vertex{-1};
int grip{-1};
bool single{true}; // one curve between its straights, instead of the whole line
double origin{0.0}; // km of the start, m
int designed{0}; // vertices whose parameters came from the alignment kept in the scenery
int departed{-1}; // alignment kept in the scenery near the fragment, which its paths no longer follow
double departure{0.0};
};
void render_route_ui();
bool render_route_parameters();
@@ -780,7 +784,11 @@ class editor_mode : public application_mode, private editor_track::observer
bool route_from_curve(TTrack &Track);
bool route_from_line(TTrack &Track);
alignment::vertex route_vertex_of(editor_track::curve const &Curve) const;
bool route_load(TTrack &Track) { return m_route.single ? route_from_curve(Track) : route_from_line(Track); }
bool route_load(TTrack &Track);
void route_read_stored();
void route_take_stored(int const Index);
void route_store();
void render_route_stored();
void route_update() { m_route.result = alignment::compute(m_route.design); }
void route_apply();
bool route_relay_through_switches(editor_track::chain const &Chain, std::vector<std::pair<TTrack *, editor_track::state>> &States, std::vector<TTrack *> &Created);