17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-02 06:59:13 +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:
maj00r
2026-10-25 00:54:50 +02:00
parent ece61056ff
commit e43863932d
12 changed files with 384 additions and 33 deletions

View File

@@ -1086,6 +1086,13 @@ void TTrack::init_segments( bool const Initial ) {
fTexHeightOffset = texheightoffset;
SwitchExtension->Segments[ index ]->InitChain( std::move( chain ) );
}
// the profiles of the switch are made at the mean of the rolls of its paths; lofted, they're turned from it to the roll of
// each path along it, so a switch on a cant ramp follows the ramp to its ends
float mean1, mean2;
profile_rolls( mean1, mean2 );
for( std::size_t index = 0; index < 2; ++index ) {
SwitchExtension->Segments[ index ]->set_baked_roll( mean1 );
}
}
if( Initial ) {