Skip to content

Implement tunnel=building_passage support#895

Merged
louis-e merged 3 commits into
mainfrom
feature/building-passage
Apr 6, 2026
Merged

Implement tunnel=building_passage support#895
louis-e merged 3 commits into
mainfrom
feature/building-passage

Conversation

@louis-e

@louis-e louis-e commented Apr 6, 2026

Copy link
Copy Markdown
Owner

Render ground-level archway openings through buildings where highway ways tagged tunnel=building_passage pass through. A pre-scan phase collects passage highway coordinates into a CoordinateBitmap, which is threaded into building generation to:

  • Cut wall blocks below passage height in build_wall_ring()
  • Skip ground floors and place passage ceiling lintels
  • Add corridor side walls where interior meets the passage
  • Skip foundation pillars, corner quoins, wall depth features, window decorations, and special doors at passage coordinates
  • Suppress interior furniture placement inside the passage zone

Render ground-level archway openings through buildings where highway
ways tagged tunnel=building_passage pass through. A pre-scan phase
collects passage highway coordinates into a CoordinateBitmap, which
is threaded into building generation to:

- Cut wall blocks below passage height in build_wall_ring()
- Skip ground floors and place passage ceiling lintels
- Add corridor side walls where interior meets the passage
- Skip foundation pillars, corner quoins, wall depth features,
  window decorations, and special doors at passage coordinates
- Suppress interior furniture placement inside the passage zone
Copilot AI review requested due to automatic review settings April 6, 2026 19:14
@github-actions

github-actions Bot commented Apr 6, 2026

Copy link
Copy Markdown

⏱️ Benchmark run finished in 0m 45s
🧠 Peak memory usage: 1706 MB

📈 Compared against baseline: 30s
🧮 Delta: 15s
🔢 Commit: 721df43

⚠️ This PR worsens generation time.

📅 Last benchmark: 2026-04-06 19:24:41 UTC

You can retrigger the benchmark by commenting retrigger-benchmark.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for rendering tunnel=building_passage highways as ground-level archway passages through generated buildings by pre-scanning passage coordinates and threading them into building/interior generation.

Changes:

  • Added a pre-scan in highway processing to collect tunnel=building_passage coverage into a CoordinateBitmap.
  • Threaded the passage bitmap through building generation to suppress walls/floors/decorations/doors/interior placement within the passage zone.
  • Added corridor side walls adjacent to the passage to form an interior archway corridor.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
src/element_processing/subprocessor/buildings_interior.rs Skips interior pattern placement in passage zones below the archway height.
src/element_processing/highways.rs Adds passage coordinate collection and extracts highway width calculation for pre-scan usage.
src/element_processing/buildings.rs Integrates passage carving into wall/floor/decoration/door logic and adds passage side walls.
src/data_processing.rs Computes the passage bitmap once and passes it into building generation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/element_processing/buildings.rs
Comment thread src/element_processing/buildings.rs
Comment thread src/element_processing/highways.rs
Comment thread src/element_processing/subprocessor/buildings_interior.rs
Comment thread src/data_processing.rs
@louis-e

louis-e commented Apr 6, 2026

Copy link
Copy Markdown
Owner Author

retrigger-benchmark

…nused

- Make BUILDING_PASSAGE_HEIGHT pub(crate) and use it in buildings_interior.rs
  instead of hardcoded literal 4 (Copilot comment 4)
- Add CoordinateBitmap::new_empty() zero-allocation constructor
- Skip bitmap allocation in collect_building_passage_coords when no
  tunnel=building_passage ways exist (Copilot comment 5)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/element_processing/buildings.rs
Comment thread src/element_processing/buildings.rs
Comment thread src/element_processing/buildings.rs
Comment thread src/element_processing/buildings.rs
Comment thread src/element_processing/buildings.rs
Comment thread src/element_processing/highways.rs
Elevated building:part elements (min_level > 0) sit above ground-level
passages and must not have their walls, floors, or decorations carved.
Create an effective_passages reference in generate_buildings() that
substitutes an empty bitmap for non-ground-level buildings, ensuring
all downstream functions receive no passage coordinates.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/element_processing/buildings.rs
Comment thread src/element_processing/buildings.rs
Comment thread src/element_processing/buildings.rs
@louis-e louis-e merged commit d30208f into main Apr 6, 2026
6 checks passed
@louis-e louis-e deleted the feature/building-passage branch April 6, 2026 19:49
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