mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-17 19:09:25 +02:00
Editor checkpoint: turnout domain service, web->editor rename, Id-1 templates
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.
This commit is contained in:
@@ -15,15 +15,21 @@ namespace editor
|
||||
|
||||
std::vector<turnout_preset> const &turnout_presets()
|
||||
{
|
||||
// the everyday PKP rozjazdy zwyczajne. the crossing mark and radius are the defining pair;
|
||||
// the length the switch spans follows from them and is shown in the editor
|
||||
// the standard PKP rozjazdy zwyczajne (49E1 / 60E1). crossing mark, radius and catalogue length
|
||||
// (PR→KR along the through track). the crossing angles check out as atan(1/n); the lengths follow
|
||||
// the type tables (metres). the diverging leaves not tangent but at the blade angle (beta) after a
|
||||
// straight pre-blade lead, then arcs by (alfa - beta) to the frog.
|
||||
//
|
||||
// blade_angle and pre_blade are NOT yet from Id-1 - left at 0 (a tangent arc from PR) until the
|
||||
// catalogue figures are in. Fill them per type when we have them; the geometry already supports it.
|
||||
static std::vector<turnout_preset> const presets{
|
||||
{"Rz 1:9 R190", 9.0, 190.0},
|
||||
{"Rz 1:9 R300", 9.0, 300.0},
|
||||
{"Rz 1:12 R300", 12.0, 300.0},
|
||||
{"Rz 1:14 R500", 14.0, 500.0},
|
||||
{"Rz 1:18,5 R1200", 18.5, 1200.0},
|
||||
{"Rz 1:26,5 R2500", 26.5, 2500.0}};
|
||||
{"Rz 1:7,5 R190", 7.5, 190.0, 25.222, 0.0, 0.0},
|
||||
{"Rz 1:9 R190", 9.0, 190.0, 27.138, 0.0, 0.0},
|
||||
{"Rz 1:9 R300", 9.0, 300.0, 33.230, 0.0, 0.0},
|
||||
{"Rz 1:12 R500", 12.0, 500.0, 41.594, 0.0, 0.0},
|
||||
{"Rz 1:14 R500", 14.0, 500.0, 42.371, 0.0, 0.0},
|
||||
{"Rz 1:14 R760", 14.0, 760.0, 54.216, 0.0, 0.0},
|
||||
{"Rz 1:18,5 R1200", 18.5, 1200.0, 64.818, 0.0, 0.0}};
|
||||
return presets;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user