Skip to content

Keep the roads after a spline when its length or heading changes. - #136

Merged
turbo-devv merged 2 commits into
openOMSI-org:mainfrom
benchan0527:fix/spline-chain-follows
Nov 22, 2026
Merged

turbo-devv merged 2 commits into
openOMSI-org:mainfrom
benchan0527:fix/spline-chain-follows

Conversation

@benchan0527

Copy link
Copy Markdown
Contributor

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 1 and -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).

Ben Chan and others added 2 commits November 22, 2026 15:55
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.
@turbo-devv
turbo-devv merged commit 08a8f91 into openOMSI-org:main Nov 22, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants