17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-02 05:49:13 +01:00

fix(editor): a curve laid from a free end on a curve, or to one, goes on from its curvature: traced (Tab) from the end of the diverging track of a switch it begins right at P4 at the radius of the switch, not on a straight nor with a transition from a curvature of 0. The design of the line takes the curve of the adjoining track at each end (start_curved/end_curved with the radius, the side and the cant, kept with it in the scenery): the curve of the first vertex turning its way, or of the last one, begins right at the end, its transition going from that curvature and cant to those of its first arc, as between the arcs of a compound curve, none where it goes on at its radius; the radius of its arcs is the one which begins it there, solved for the tangent, the curves next to it making room on the straight. A curve traced next to such an end is fitted by its transitions alone, with none between the curves where the points keep to that as well, or laid from a straight there where it doesn't go on from it or that keeps to the points much closer: eased out of the curve of a plain track by the transition of the norms, the line beginning at its end, or right from P4, as a switch goes on with a straight. A bend of straights turning the way of the curve gets its curve going on from it with the transitions and the cant of the norms; the other way, or a straight, as before: eased out of the curve of a plain track, the jump of the curvature kept at a switch, as at its start, and not warned of. The cant of the adjoining track goes on into the curve with no ramp at that end; the norms ask for the transition between the curves only where the curvature differs by more than 5 % or the cant by 5 mm. The readout by the cursor, the status after laying and the plan tell the curve going on from the track, the plan with a box to go on or not. Dragged back to P4 from a point the curve goes on from its radius too. Selftests laywalk, laybends, curvejoint, endcurves; unit tests of a curve going on from a switch and into a free end, its cant, traced, through a transition into a larger radius, and of a bend of straights after such an end

This commit is contained in:
maj00r
2026-10-25 12:28:55 +01:00
parent 91900a0ead
commit 97b6a84d1b
13 changed files with 1210 additions and 38 deletions

View File

@@ -98,6 +98,16 @@ struct design
// known; a design going on at the curvature of the adjoining track doesn't change it abruptly
int start_turn{0};
int end_turn{0};
// the curve of the first vertex goes on from the curve of the adjoining track at the start, where it turns its way, as a track laid on
// from a curved free end: it begins right at the start, with no straight before it, its transition in going from the curvature and
// the cant of the adjoining track (start_radius, start_turn, start_cant) to those of its first arc. The radii of its arcs are the
// ones which begin it there, the transitions and the shares as given. The same for the curve of the last vertex at the end; a curve
// of the only vertex goes on from the start alone
bool start_curved{false};
bool end_curved{false};
// mm, the cant of the adjoining track at the start and at the end, leaning into its turn
double start_cant{0.0};
double end_cant{0.0};
// length of the straight beyond the start and the end, which the curves can take over
double start_reserve{0.0};
double end_reserve{0.0};
@@ -175,6 +185,11 @@ struct curve_report
recommendation recommended;
bool spirals{false}; // two transition curves with no arc between them
double cant{0.0};
// the curvature and the cant of the curve of the adjoining track it goes on from at its start, and into at its end; 0 from a straight
double curvature_in{0.0};
double cant_in{0.0};
double curvature_out{0.0};
double cant_out{0.0};
};
struct profile_point