mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-28 15:47:30 +01:00
feat(editor): connections of tracks laid whole from the switch tool: a crossover with a straight insert or an aligning curve between switches of different angles or tracks that aren't parallel, a double crossover meeting on either track, a scissors crossover with the crossing of its inserts, and a switch ladder onto the parallel tracks of a fan or onto new ones at given spacings; press on a straight and drag onto the other track, Shift+wheel the kind, Ctrl+wheel the R of the aligning curve, Alt+wheel where a double crossover meets; the ghost shows the whole set with the spacing, the inserts and the distance of the mathematical points; switches get their drives and a //$r connection record; the crossover drawn from a diverging end uses the same solver; self-test connection
This commit is contained in:
@@ -26,7 +26,7 @@ namespace switch_store
|
||||
struct record
|
||||
{
|
||||
scene::layer_handle layer{null_handle};
|
||||
std::string kind{"switch"}; // switch, slip, crossing, double
|
||||
std::string kind{"switch"}; // switch, slip, crossing, double, connection
|
||||
std::string name; // the switch, or the base name of a slip or a crossing
|
||||
std::string type{"Rz"}; // Rz, Rlj, Rld, Rkp, Rkpd, Skrz, Rpd, Rpj, - when unknown
|
||||
std::string rail{"-"};
|
||||
@@ -55,6 +55,8 @@ std::vector<record> const &records();
|
||||
std::optional<record> of(TTrack const &Track);
|
||||
// the record of the track by its name alone, also when the switch lost its shape
|
||||
std::optional<record> named(TTrack const &Track);
|
||||
// the connections of switches the switch is a part of
|
||||
std::vector<record> connections(TTrack const &Track);
|
||||
// records whose switches were moved or turned as a whole take their new place and km; returns their names
|
||||
std::vector<std::string> follow();
|
||||
// radius of the diverging track: of the type, bent with the main track for an arc switch
|
||||
|
||||
Reference in New Issue
Block a user