mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-29 15:07:29 +01: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:
@@ -965,10 +965,7 @@ save_result node_layers::save(std::vector<std::string> const &Rootstatements, st
|
||||
auto const path_text = [](TTrack &Path, glm::dvec3 const &Offset) {
|
||||
auto const paths{Path.m_paths};
|
||||
for (auto &path : Path.m_paths)
|
||||
{
|
||||
path.points[segment_data::point::start] -= Offset;
|
||||
path.points[segment_data::point::end] -= Offset;
|
||||
}
|
||||
path.translate(-Offset);
|
||||
std::string text;
|
||||
Path.export_as_text(text);
|
||||
Path.m_paths = paths;
|
||||
|
||||
Reference in New Issue
Block a user