Implement tunnel=building_passage support#895
Conversation
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
|
⏱️ Benchmark run finished in 0m 45s 📈 Compared against baseline: 30s 📅 Last benchmark: 2026-04-06 19:24:41 UTC You can retrigger the benchmark by commenting |
There was a problem hiding this comment.
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_passagecoverage into aCoordinateBitmap. - 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.
|
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)
There was a problem hiding this comment.
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.
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.
There was a problem hiding this comment.
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.
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: