A turnout's diverging track does not leave the through track tangentially. It
runs straight along the through track to the blade tip (odcinek przediglicowy),
breaks away there by the blade angle (kąt nagięcia iglicy, beta), runs straight
over the blade to its heel, and only then curves - through alfa - beta, not the
whole crossing angle - to the frog.
Give TurnoutSegment a turn_in: a signed heading break applied before the segment
is laid, which is the only way to express a track leaving by an angle rather than
a tangent. lay_turnout then places the lead, the break and the blade ahead of the
curve and hands the curve the angle that is actually left to spend; a zero blade
length keeps the break and starts the curve at the tip. Reject a blade angle that
is negative or already reaches the crossing angle.
All-zero blade figures lay exactly the old tangent arc from PR, so existing
layouts are untouched. Junction and turnout_preset carry the three new figures
through to the panel; the presets themselves still hold zeros until the Id-1
catalogue numbers are in.
Add test_turnout: the lead sits on the through track, the blade breaks by beta,
and the frog still lands on the full crossing angle and the catalogue length,
mirrored for a right-hand turnout.
Pinning previously rewrote only the branch's first (leaving) straight to start
at the frog and run along the frog heading. Any straight appended behind it
stayed where the user drew it, so its gap fit was solved against a leaving
straight that had jumped out from under it — the appended fragment could end up
~1.4 km from the frog.
Move the branch as one rigid body instead: the leaving straight fixes the
rotation+translation onto the frog, and every appended straight rides along
under the same motion, so the shapes and inter-fragment fits are preserved and
the branch still meets the switch tangentially by construction.
Add a test that draws an L-shaped branch far from the frog and checks the whole
centreline lands next to the frog after pinning.
Checkpoint of the editor branch so work isn't carried loose across a branch
switch. Builds.
- maj0sted turnout geometry moved into the domain: domain::lay_turnout lays the
diverging path (pre-blade lead, blade at beta, arc of alfa-beta, frog rail) and
solve_junction is a thin adapter onto it.
- the maj0sted web/ tree renamed to editor/ (namespace and paths) - there is no
WASM here, it's plain native C++ the editor calls.
- click places the switch at its start (początek rozjazdu); the branch's leaving
straight is locked tangent to the frog; switches can be slid along the through
track and flipped L/P.
- Polish turnout templates carry catalogue length (Id-1-consistent lengths), plus
blade-angle and pre-blade fields (left 0 until the catalogue figures are in).
- TURNOUT_SPEC.md: the Bezier-based runtime/model contract.
- also folds in other pending branch changes (scenery, tests) to leave a clean tree.