mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-17 08:39:19 +02:00
feat(editor): norms of laying, free by default: free lays plain arcs with no transition curves and no cant and keeps quiet about the norms, PKP PLK gives the transitions and the cant for the design speed with the warnings, chosen at the top of the Lay panel; digits in Tracks only type values, never change the edit mode; in Lay a track under the cursor says the click starts on the ground beside it, Shift+click chooses it for a parallel track; Alt while laying turns the direction in steps of 15 degrees, with the azimuth by the cursor; K splits only within 20 px of the selected track, where a marker shows it; the environment, overhead line, transition curve, view and include labels translated, one name for laying track in Polish
This commit is contained in:
@@ -656,9 +656,9 @@ result fit_between(design const &Design)
|
||||
report.unbalanced = unbalanced_acceleration(Design.speed, sharpest, std::max(0.0, vertex.cant), Design.norms);
|
||||
report.recommended = recommend(Design.speed, sharpest, Design.norms);
|
||||
r.curves.push_back(report);
|
||||
if (sharpest < report.recommended.radius_min - 1e-6)
|
||||
if (Design.norms.checked && sharpest < report.recommended.radius_min - 1e-6)
|
||||
r.warnings.emplace_back(format("Vertex %zu: R %.0f m is below the minimum %.0f m for %.0f km/h", k + 1, sharpest, report.recommended.radius_min, Design.speed));
|
||||
if (report.unbalanced > Design.norms.unbalanced + 1e-6)
|
||||
if (Design.norms.checked && report.unbalanced > Design.norms.unbalanced + 1e-6)
|
||||
r.warnings.emplace_back(format("Vertex %zu: unbalanced acceleration %.2f m/s2 exceeds %.2f m/s2", k + 1, report.unbalanced, Design.norms.unbalanced));
|
||||
continue;
|
||||
}
|
||||
@@ -756,6 +756,8 @@ result fit_between(design const &Design)
|
||||
r.curves.push_back(report);
|
||||
|
||||
auto const &norms{Design.norms};
|
||||
if (false == norms.checked)
|
||||
continue;
|
||||
if (radius < report.recommended.radius_min - 1e-6)
|
||||
r.warnings.emplace_back(format("Vertex %zu: R %.0f m is below the minimum %.0f m for %.0f km/h", k + 1, radius, report.recommended.radius_min, Design.speed));
|
||||
if (curve.cant > norms.cant_max + 1e-6)
|
||||
@@ -782,7 +784,7 @@ result fit_between(design const &Design)
|
||||
push_straight(cursor, lastdirection, tail);
|
||||
r.length = chainage;
|
||||
|
||||
if (Design.norms.tangent_min_time > 0.0)
|
||||
if (Design.norms.checked && Design.norms.tangent_min_time > 0.0)
|
||||
{
|
||||
auto const minimum{Design.norms.tangent_min_time * Design.speed / 3.6};
|
||||
for (std::size_t i = 1; i + 1 < r.elements.size(); ++i)
|
||||
|
||||
Reference in New Issue
Block a user