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

feat(editor): the kept alignments and switches after a drag of the gizmo or of a point: a line all of whose paths are moved or turned as a whole takes its kept design along; paths pulled out of a kept design, or given another cant, are told about on the status line with the way back; a switch moved or turned as a whole keeps its type and its record follows it, with its km; a switch bent out of the shape of its type loses it and is told about (//$r records keep the shape of the switch); all of it in the same undo step as the drag; Polish translation

This commit is contained in:
maj00r
2026-10-11 16:57:23 +02:00
parent ddb637a3f5
commit 4ea2f4f13f
8 changed files with 307 additions and 10 deletions

View File

@@ -85,6 +85,12 @@ int departed(std::vector<TTrack *> const &Tracks, double &Departure);
// keeps the design in the file of the layer, in place of the one with the same ends
int store(alignment::design const &Design, alignment::result const &Result, double const Origin, scene::layer_handle const Layer);
void forget(int const Index);
// the point on the line of the stored alignment, if it lies by it within the reach
std::optional<hit> on_record(int const Index, glm::dvec3 const &Point, double const Reach);
// cant of the design at the chainage, mm
double cant_at(int const Index, double const Chainage);
// the stored alignment moved and turned in the plan the way the point and the direction were
void transform(int const Index, glm::dvec3 const &From, glm::dvec2 const &Fromdirection, glm::dvec3 const &To, glm::dvec2 const &Todirection);
// km of the point on the stored alignments, if it lies on one
std::optional<double> chainage_at(glm::dvec3 const &Point);
// the records as they were before the changes made since the last call, if there were any; the current ones become the base