mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-19 07:19:18 +02:00
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.
9.6 KiB
9.6 KiB