mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-01 03:29:03 +01:00
feat(editor): a switch laid with no track there, and no switch laid by a click: a press on the ground with a switch armed lays the switch there, its start where it was pressed, the direction of its main track taken from the drag once it's 4 m long and held, the drag sideways then giving the side of the diverging track, back by the start the direction free again; pressed by a free end within 5 m it goes on from that end in its direction and grade, joined to it. Its ends are left free to lay on from, styled after the track it goes on from or as the lay tool lays its tracks (editor_track::create_switch with a path_style). A press let go within 10 pixels places no switch, a slip at a crossing included, which was laid at once on the press: it's laid once dragged, its straights shown meanwhile. The hints and the panel tell of both. Selftest switchfree: Rz 60E1-300-1:9 on the ground with its four ends free, from the free end of a straight joined and walked through; a click on a straight laid none, a drag laid z1
This commit is contained in:
@@ -207,6 +207,8 @@ float const kHandleRadius{10.0f};
|
||||
double const kLaySnapRadius{5.0};
|
||||
float const kSnapPixels{16.0f};
|
||||
double const kSwitchReach{6.0}; // a press farther from the selected track selects another one instead of placing the switch
|
||||
double const kFreeSwitchLock{4.0}; // m of the drag a switch with no track takes the direction of its main track from
|
||||
double const kFreeSwitchRelease{2.0}; // m from its start the drag of a switch with no track lets the direction go again
|
||||
double const kSlipReach{12.0}; // m; a slip goes to the crossing nearest the cursor, if it's this close
|
||||
// m, of the straights past the ends of a curve a crossover laid along it reaches onto: from a transition it goes on onto the
|
||||
// straight after it
|
||||
|
||||
Reference in New Issue
Block a user