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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user