mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-12-01 03:37:09 +01:00
fix(editor): the traced line takes its fitted grade line once done and follows the setup, the laid end isn't a point clicked, a free end not reached isn't joined
- The line traced shown is worked out again while its grade line is being fitted (follow_meanwhile() tells a stopgap), and when the
settings of the trace change ("It's a side track", the norms): the key of its cache kept the stopgap, or the refusal, till the next
click.
- Going on from the end of the line laid, that end stays the start of the points, not one of the points clicked: Esc counted it, and
Backspace back to it then Enter said "Click at least two points" instead of ending the line.
- Leaving the lay tool cancels the laying with its wait for the terrain: left behind, a stale end with no points was laid when the tool
was back.
- A free end no candidate of the tracer reaches is told, not laid as joined with a gap left.
- A curve the trace laid slower than the line shows its speed in Plan, and a change of its radius there lays it at the speed of the line.
- A track dragged out of a free end keeps the heights of the setting while the clicks are traced: the fitted heights are for the sparse
points clicked on the photo.
- The time of a click of the tracer is checked only with EU07_TRACE_TIMING set: the coverage job of the CI, with no optimisation, took
several times as long. The evaluations are checked always.
This commit is contained in:
@@ -1622,7 +1622,11 @@ void editor_mode::render_route_gizmo()
|
||||
continue;
|
||||
auto const secant{1.0 / std::cos(curve.deflection * 0.5) - 1.0};
|
||||
if (secant > 1e-6)
|
||||
{
|
||||
vertex.radius = std::max(10.0, std::round(distance / secant));
|
||||
// the speed a trace laid the curve slower for was of the radius it fitted
|
||||
vertex.speed = 0.0;
|
||||
}
|
||||
}
|
||||
route_update();
|
||||
model_plan_preview();
|
||||
@@ -2192,7 +2196,14 @@ bool editor_mode::render_route_vertex(int const Index)
|
||||
item_tooltip("The curve begins right at the end of the fragment, at the curvature of the track adjoining there, where it turns the same way; its radius is the one "
|
||||
"which begins it there, the transition at that end goes between the two curves");
|
||||
}
|
||||
changed |= field("##radius", vertex.radius, 5.0f, vertex.compound ? STR_C("R1 %.0f m") : STR_C("R %.0f m"), overlay_color::grip, "Radius of the arc: drag sideways, or a double click to type it", part::arc);
|
||||
// a curve a trace laid slower than the line: told, and laid at the speed of the line once its radius is changed, made wider say
|
||||
if (vertex.speed > 0.0)
|
||||
ImGui::TextDisabled("%s", format(STR_C("Laid for %.0f km/h, slower than the line: a change of its radius lays it at the speed of the line"), vertex.speed).c_str());
|
||||
if (field("##radius", vertex.radius, 5.0f, vertex.compound ? STR_C("R1 %.0f m") : STR_C("R %.0f m"), overlay_color::grip, "Radius of the arc: drag sideways, or a double click to type it", part::arc))
|
||||
{
|
||||
changed = true;
|
||||
vertex.speed = 0.0;
|
||||
}
|
||||
ImGui::SameLine();
|
||||
changed |= field("##cant", vertex.cant, 1.0f, STR_C("cant %.0f mm"), IM_COL32(240, 170, 60, 255),
|
||||
vertex.compound ? "Height of the outer rail above the inner one on the sharpest arc; the arcs with no cant of their own get it in proportion to their curvature"
|
||||
|
||||
Reference in New Issue
Block a user