Skip to content

fix: no building is lost in the free line along a section seam - #6

Merged
neovolgan merged 1 commit into
claude/fence-importfrom
claude/world-seam-fixes
Oct 16, 2026
Merged

neovolgan merged 1 commit into
claude/fence-importfrom
claude/world-seam-fixes

Conversation

@neovolgan

Copy link
Copy Markdown
Collaborator

Found while assembling PilnaVillage: real Pilna data, 21 sections of 1024 tiles, 4315 source buildings. This PR is stacked on #5.

1. Seam-margin outlines were lost.

  • MapGenerator.CanPlace keeps a one-tile free line inside each section, so an outline starting on a section's first column (or ending on its last) is refused by the section importer as "Outside the map".
  • ImportWorldBuildings only shared outlines whose footprint corners lie in different sections, so it skipped these too, and they vanished. There were 10 in Pilna.
  • Fix: an outline is now shared when its footprint or its free line (x−1 … x+width, y−1 … y+height) reaches another section. The footprint corners must still lie in sections.
  • New test: an outline at 256.4–268.6 is refused by the section importer ("Outside the map") and becomes the one shared building, while an inner outline is left to its section.

2. The "Cell boundary" skip reason was misleading.

  • Buildings may cross native 256-tile cells. That label was given to any CanPlace failure (overlap, water or road) of an outline that happened to cross a cell line.
  • In Pilna, all 9 such "Cell boundary" skips were really other failures.
  • Fix: the reason chain is now outside the map → building overlap → environment object → water or road.

Results: core 345/345 passed, npm test 184/184 passed.


Generated by Claude Code

ImportWorldBuildings now shares an outline when its footprint or the
one-tile free line a section keeps around a building (CanPlace) reaches
another section; the section importer refuses such an outline as outside
its map, so it used to vanish at the seam. The section import skip
reason no longer says 'Cell boundary' (buildings may cross native cells;
that label was given to overlap/water/road failures) and names
environment objects separately.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015ECCGjSrSADcjxBmXdCBpm
@neovolgan
neovolgan added this pull request to stack #7 October 16, 2026 21:14
@neovolgan
neovolgan merged commit 81d162e into develop Oct 16, 2026
1 check 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