mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-01 01:09:04 +01:00
feat(editor,track): a cant ramp of its own, off the transition curve: each end of a curve may have its ramp moved and of a length of its own (ST-T1-A6 9.6 pkt 5 and 11), on the straight before the curve or on the arc, the transition keeping the full cant all along, as a switch laid on it wants it; set in the plan under "Cant ramps", stored with the vertex as "ramps", reversed with the curve, marked across the track in the view. The cant of a line is a profile along it now, the paths cut where a ramp of its own starts and ends, their rolls following it, warnings where a ramp is shorter than its cant asks for or reaches into the curve before, past the line or over the other ramp. A switch on a cant ramp is drawn following it: its rails, blades, frogs and bed made at the mean of its rolls, as before, are turned along each path to the roll of the path there, so it no longer steps at its ends against the tracks either side. The checks of a switch laid into a curve warn of the values of table 11.9 in brackets as of the others, with no word of a consent. Unit test of a ramp moved onto the straight
This commit is contained in:
@@ -74,6 +74,14 @@ struct vertex
|
||||
// two transition curves meeting at the curvature of the radius, with no arc between them and no cant: the bend of two straights
|
||||
// eased the way the lines are drawn. Their lengths follow from the radius and the deflection, the ones given are left out
|
||||
bool spirals{false};
|
||||
// the cant ramp at each end of the curve where it doesn't go along the transition curve (ST-T1-A6 9.6 pkt 5 and 11): how far its
|
||||
// outer end lies into the curve from the start of the curve, or from its end, below 0 out along the straight, and its length; a
|
||||
// length below 0 keeps the ramp along the transition, as the norms recommend
|
||||
double ramp_in_offset{0.0};
|
||||
double ramp_in_length{-1.0};
|
||||
double ramp_out_offset{0.0};
|
||||
double ramp_out_length{-1.0};
|
||||
bool own_ramps() const { return ramp_in_length >= 0.0 || ramp_out_length >= 0.0; }
|
||||
};
|
||||
|
||||
struct design
|
||||
@@ -187,6 +195,19 @@ struct result
|
||||
std::vector<element> elements;
|
||||
std::vector<curve_report> curves;
|
||||
std::vector<profile_point> profile;
|
||||
// the cant along the line, mm at the chainages, between them changing evenly; signed with the turn of the curve it belongs to,
|
||||
// as the rolls of the paths are
|
||||
std::vector<glm::dvec2> cants;
|
||||
// the cant ramps at the ends of the curves, where the cant goes from 0 to the one of the curve
|
||||
struct cant_ramp
|
||||
{
|
||||
int vertex{-1};
|
||||
double from{0.0};
|
||||
double to{0.0};
|
||||
double cant{0.0}; // mm, at the end of the ramp in the curve
|
||||
bool own{false}; // not along the transition curve
|
||||
};
|
||||
std::vector<cant_ramp> ramps;
|
||||
double length{0.0};
|
||||
glm::dvec3 start{0.0};
|
||||
glm::dvec3 end{0.0};
|
||||
|
||||
Reference in New Issue
Block a user