mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-29 08:07:29 +01:00
feat(editor): the switch no longer slides to meet the track, only the straight and arc fill in: arc of the switch radius between two straights, and where the angles match but the tracks are apart, or the arc doesn't fit, reverse curves with no transitions and the largest radius that fits; the straight between them (6 m to V 60, 0.15 V to 100, 0.25 V above) only when 1/R1 + 1/R2 > 1/106.5 m (PLK ST-T1 9.3, table 9.4); new pieces take the style of a plain track, not of a switch
This commit is contained in:
@@ -214,16 +214,18 @@ class editor_track
|
||||
struct branch_link
|
||||
{
|
||||
bool valid{false};
|
||||
double shift{0.0};
|
||||
double trim{0.0};
|
||||
double radius{0.0};
|
||||
double before{0.0};
|
||||
double after{0.0};
|
||||
double shortfall{0.0};
|
||||
bool reverse{false};
|
||||
double insert{0.0};
|
||||
std::vector<segment_data> pieces;
|
||||
};
|
||||
static double branch_radius(segment_data const &Diverging);
|
||||
static branch_link link_branch(branch_end const &From, glm::dvec3 const &Slide, double const Radius, branch_end const &To, double const Kink);
|
||||
static double reverse_insert(double const Speed);
|
||||
static branch_link link_branch(branch_end const &From, double const Radius, branch_end const &To, double const Kink, double const Insert);
|
||||
|
||||
struct snap_target
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user