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

feat(editor): a switch path can be a chain of pieces: the attributes pieces1 and pieces2 keep the parts of each path after the classic bezier, which stays as the approximation older versions read and log the attributes as unknown; the simulation drives, draws and maps a path along its pieces by distance, pieces that don't join the ends of the path are reported and the bezier used; the catalogue Rz switches get the diverging path as the arc of their radius and the straight after it, moving, rotating and mirroring a switch carry the pieces, reshaping a path by hand drops them; self-test commands switchpieces and switchbreak

This commit is contained in:
maj00r
2026-10-12 18:32:23 +02:00
parent 46d41549c9
commit ea341af27a
8 changed files with 329 additions and 60 deletions

View File

@@ -359,10 +359,7 @@ std::vector<segment_data> editor_track::slid(TTrack const &Switch, double const
auto const shift{run * (Distance / planlength)};
auto paths{Switch.m_paths};
for (auto &path : paths)
{
path.points[segment_data::point::start] += shift;
path.points[segment_data::point::end] += shift;
}
path.translate(shift);
return paths;
}