17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-30 21:20:28 +01:00

feat(track): the guard rails of a crossing at a wide angle reach a metre past the rails of the other track instead of 0.3 m and open their flangeway over 0.6 m at the ends, the way the guard arms of the corners of a diamond run out on real crossings, the reach and the flare are the constants guard_reach and guard_flare shared by the plan and the layer

This commit is contained in:
maj00r
2026-10-14 10:53:28 +02:00
parent 701d82d1bd
commit f27ed682c0
3 changed files with 5 additions and 3 deletions

View File

@@ -563,7 +563,7 @@ void TTrack::rail_layer::lay_guards() {
auto const outside { Miter.x + Miter.y * ( top + m_guardoffset ) };
return Latest ? std::max( inside, outside ) : std::min( inside, outside ); };
for( auto const &guard : ours( m_layout.guards ) ) {
auto const offsets { flared( guard.from, guard.to, std::min( 0.3, 0.25 * ( guard.to - guard.from ) ), m_guardoffset, guard.flarefrom ? 0.02 : 0.0, guard.flareto ? 0.02 : 0.0 ) };
auto const offsets { flared( guard.from, guard.to, std::min( guard_flare, 0.25 * ( guard.to - guard.from ) ), m_guardoffset, guard.flarefrom ? 0.02 : 0.0, guard.flareto ? 0.02 : 0.0 ) };
auto cuts { guard.plan.cuts };
sort_cuts( cuts );
auto start { guard.from };