18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-01 07:07:05 +01:00

feat(editor): the parallel tool beside a line of the model lays a line of the model, its arcs concentric

Continues E4b (editor-tracks-domain.md §8, "Odsuń tor równoległy"): with the editing on the model on, the parallel tool beside a track of
a line of the model lays a new line of the model at the spacing, one create_line, checked by the norms.

- editor/layout/layoutParallel: the line alongside a line, pure: the legs of the tangents offset, the vertices where the offset legs
  meet, the arcs concentric with the line's, the radius less on the inside of a curve and more on the outside, the transitions recomputed
  from the shift of the arc so the centre stays the line's; the cant and the class of the line, its grade breaks at the same share of
  the length. In a curve the spacing is widened by the widening of the gauge of both tracks on the sides facing each other (PLK tom II
  annex 1, gauge::curve_widening, under R 250 m), where the transitions of the curve can take it; where they can't, told so. The norms
  of the track geometry have no spacing of their own yet.
- The tool tells the line laid, the spacing in each curve widened, what the norms warn of; refused, why, nothing changed.

Self-test: expect modelspacing <line> <other> <m> <low> <high>. The case m_13_parallel (a line laid on the inside of the curve of a line
of the model, 4.5 m on the straight and in the arc, one step).

Tests: U: the line alongside a straight and alongside three curves on both sides, laid, the arcs concentric within 2 mm; alongside a
curve of R 200 m the spacing widened by the gauges, the transitions longer on the inside and shorter on the outside; not widened where a
curve has no transitions, told why.

lang/editor_pl.po: the Polish of the new texts.
This commit is contained in:
maj00r
2026-11-23 17:58:45 +01:00
parent 8b1720f873
commit 75ce03b95a
13 changed files with 426 additions and 0 deletions
+6
View File
@@ -326,6 +326,12 @@ void parallel_tool::parallel_update()
void parallel_tool::parallel_build()
{
auto &tool{m_parallel};
// beside a line of the model: a line of the model at the spacing, its curves concentric, checked by the norms
if (auto *source{parallel_source()}; source != nullptr && m_design.model_parallel(*source, tool.spacing, tool.side, tool.status, tool.error))
{
tool.built_for = nullptr;
return;
}
parallel_update();
if (tool.pieces.empty())
return;