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

feat(editor): the plain straight a switch branch leads into gets its end moved to where the branch lands instead of a short straight being added: shortened when it reaches past, lengthened when it ends short; straights drawn with handles count (the trimmed end loses them), so a switch slid up to a track that ends close to the crossing now places

This commit is contained in:
maj00r
2026-10-12 00:36:13 +02:00
parent b27d1772a7
commit 704511fe5e
5 changed files with 26 additions and 15 deletions

View File

@@ -1141,6 +1141,7 @@ class editor_mode : public application_mode, private editor_track::observer
bool plan_branch_link(editor_track::branch_link &Link, std::string &Reason) const;
void finish_branch_link(editor_track::branch_link const &Link);
std::string link_problem(editor_track::snap_target const &Target, editor_track::branch_link const &Link) const;
bool stretchable(editor_track::snap_target const &Target) const;
std::vector<TTrack *> link_tracks(editor_track::snap_target const &Target, editor_track::branch_link const &Link, TTrack const &Style, std::vector<std::pair<TTrack *, editor_track::state>> &States, std::vector<TTrack *> &Created);
bool cut_straight(editor_track::straight const &Line, double const From, double const To, std::vector<std::pair<TTrack *, editor_track::state>> &States, std::vector<TTrack *> &Created, std::vector<TTrack *> &Removed, TTrack **Style);
bool insert_double_slip(editor_track::straight const &Line, glm::dvec3 const &Point, editor_track::switch_template const &Shape);