17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-25 18:35:21 +01:00

feat(editor): digitizing takes the good parts of a line: a run whose design can't be read whole is split at the track the reading fails at and each part is digitized on its own, only single tracks that make no line are left out and named in the log; Digitize all reports the lines digitized and the paths left out, opening a line digitized in parts says so with the reason for the paths left out; a stored radius agrees with the one its design makes within 0.1 %

This commit is contained in:
maj00r
2026-10-12 18:00:26 +02:00
parent 95c3842748
commit 9b75e64c9b
4 changed files with 71 additions and 22 deletions

View File

@@ -829,14 +829,15 @@ class editor_mode : public application_mode, private editor_track::observer
bool route_from_line(TTrack &Track);
alignment::vertex route_vertex_of(editor_track::curve const &Curve) const;
bool route_load(TTrack &Track);
void route_read_stored();
void route_read_stored(TTrack &Track);
void route_take_stored(int const Index);
void record_switch(TTrack &Track, editor_track::switch_template const &Shape);
void record_slip(std::vector<TTrack *> const &Parts, std::string const &Kind, std::string const &Type, double const Radius, double const Angle, std::string const &Base);
void render_switch_record(TTrack const &Track) const;
void route_store();
bool digitize_drawn(std::vector<TTrack *> const &Created, bool const Alone = true);
bool digitize_chain(editor_track::chain const &Chain, std::string *Reason = nullptr);
bool digitize_chain(editor_track::chain const &Chain, std::string *Reason = nullptr, TTrack **Culprit = nullptr);
int digitize_parts(editor_track::chain const &Chain, std::string *Reason, int &Skipped);
void digitize_all();
void render_route_stored();
void route_update()