Repository navigation
Keep the roads after a spline when its length or heading changes. - #136
Merged
turbo-devv merged 2 commits intoNov 22, 2026
Merged
Conversation
A length or an end heading used to be refused, or the next piece was rebuilt so its far end stayed put. The pieces linked on after it now move with the new end, and turn with it, keeping their own length, radius and gradients. R turns one spline about its start and carries that chain with it. The joint with the piece before it is mitred the way OMSI does: a left turn of 90 degrees is skew 1 at the previous end and -1 at this start.
…rn_end keeps its own description
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
A spline that already has roads joined on after it can still have its length, radius or end heading changed. Those later pieces move with the new end and, when the end's direction changes, turn with it. Their own length, radius and gradients are left as they were. Previously the edit was refused, or the next piece was rebuilt so that its far end stayed where it was.
R on one spline turns it about its start, and the chain after it turns with it, still joined. The joint with the piece before it is mitred as OMSI does it: the previous piece's end skew and this piece's start skew. A left turn of 90° is
1and-1(1 is a 45° cut), so the same side of each profile meets.Tests
cargo test --release --bin openmapper a_length_typed_carries— the next two pieces shift and keep their lengths.cargo test --release --bin openmapper turning_an_end_swings— the next piece keeps its length and swings off its old end.cargo test --release --bin openmapper rotating_a_spline_swings— R carries the chain and writes the mitre.cargo test --release --bin openmapper a_left_corner_mitres—joint_skew(-90°)is(1, -1).