Repository navigation
AI paths: snapped height, Shift lock and typed numbers; turn round and reverse - #28
Merged
Merged
Conversation
yumin278
marked this pull request as ready for review
November 16, 2026 11:44
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.
AI paths: snapped height, Shift lock and typed numbers; turn round and reverse
Three independent changes, one commit each.
1. AI path height from the snapped lane (
79fb877)When a new AI path starts or ends on a lane (a lane end or a point along a lane), the snapped
point is the lane's line. The new path's own line lies
[path] zabove or below that line(
invis_street.sli: +0.1,invis_sidewalk.sli: −2), so the anchor height is now corrected bythat offset before the path is planned and built. Only z is corrected; a non-zero path
xislogged with
log::warn!and left alone. Free starts on the ground are unchanged.log::info!records the type, kind, path z and the height before and after on every snap.Junction-object (
.sco) paths are corrected the same way.2. Shift straight lock and typed numbers while drawing AI paths (
19b3c7f)The typed-number/straight-lock branch of
plan_roadand the corner number panel are no longerskipped in AI path mode. In that branch an AI path keeps
z1 = z0 + typed_rise()and does notfollow the terrain; the Roads tool behaves as before.
3. Turn round and reverse (
a0eb5a3)Editor::flip_selected()turns the one selected road 180° about its start and reverses it in asingle history step, so one undo puts it back. It refuses a multi-selection and roads with rows
of objects along them, and never applies angle snapping. Available next to "Reverse direction"
in both inspectors and as the unbound command
flip_path.Tests
a_path_started_on_a_street_lane_keeps_the_lane_heighta_path_started_on_a_footway_lane_keeps_the_lane_heighta_path_started_on_the_ground_keeps_the_ground_heighta_path_started_in_the_middle_of_a_lane_keeps_the_lane_heighta_path_started_on_a_crossing_objects_lane_keeps_the_lane_heighta_straight_lock_draws_an_ai_path_straight_from_a_lane_enda_typed_length_and_radius_draw_an_ai_path_straighta_typed_rise_lifts_an_ai_patha_typed_road_still_follows_the_groundone_road_turns_round_about_its_startangle_snapping_does_not_stop_the_half_turnone_undo_puts_the_road_backtwo_roads_are_left_aloneAll 26 locale tables carry the new interface texts (
python3 tools/i18n/check.py: 2908 texts,26 languages: complete).