mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-12-02 22:25:23 +01:00
feat(editor): a curve laid slower than its line, its speed kept with its vertex, the norms asked of it at that speed
The laying traced on the photo (quirky-crafting-summit, Etap 1): a curve seen on the photo sharper than the norms allow at the speed of the line is laid with the speed restricted on it, not refused. - alignment::vertex::speed: the speed its curve is laid for where it's below the design's, 0 the design's; alignment::curve_speed gives it. fit_between and make_cants ask the norms of the curve at it (the least radius, the acceleration across, the transitions, the cant ramps, the shortest arc), the curve_report tells it (speed) and meets_norms judges by it. The geometry is the same. - Kept with the design in the scenery (//$h vertex ... speed <km/h>) and read back. Tests: U: R 300 m on a line of 120 km/h below the norms at it, meeting them laid for 70 km/h; the speed written and read back.
This commit is contained in:
@@ -111,6 +111,9 @@ std::optional<alignment::vertex> read_vertex(std::istringstream &Line, scene::la
|
||||
}
|
||||
if (word == "ramps")
|
||||
Line >> vertex.ramp_in_offset >> vertex.ramp_in_length >> vertex.ramp_out_offset >> vertex.ramp_out_length;
|
||||
// the speed of a curve slowed down below the one of the line
|
||||
if (word == "speed")
|
||||
Line >> vertex.speed;
|
||||
}
|
||||
position = Context.to_world(position);
|
||||
vertex.position = {position.x, position.z};
|
||||
@@ -299,6 +302,8 @@ std::vector<std::string> alignment_lines(std::vector<alignment_store::record> co
|
||||
}
|
||||
if (vertex.own_ramps())
|
||||
text += format(" ramps %.3f %.3f %.3f %.3f", vertex.ramp_in_offset, vertex.ramp_in_length, vertex.ramp_out_offset, vertex.ramp_out_length);
|
||||
if (vertex.speed > 0.0)
|
||||
text += format(" speed %.1f", vertex.speed);
|
||||
lines.push_back(text);
|
||||
}
|
||||
for (auto const &click : entry.clicks)
|
||||
|
||||
Reference in New Issue
Block a user