Repository navigation
Walls: repair T-junction cracks; rise to a raised upper floor - #1208
Merged
Merged
Conversation
Opening cuts (three-bvh-csg) and finish-band splits left vertices lying on neighbouring triangles' edges. At full precision the seams look closed, but a baked GLB quantizes positions and those T-junctions open into dotted light leaks along wall seams and around openings. - repairWallTJunctions splits each triangle at the vertices on its edges by joining them to the opposite corner (no invented vertices), carrying the source triangle's material group so faces are never reclassified; walls without T-junctions are returned untouched. - Band splitting interpolates seam vertices from a canonical endpoint so both triangles on an edge get a bit-identical vertex. - Goldens: the 40 fixture walls that had T-junctions are rebaselined (3199 -> 0); volume, bounds and per-material area match within 5e-8 / 7e-7; the other 18 stay byte-identical. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Floor 1 is one plane, lifted by the tallest foundation under it. A second ground plate without a foundation kept its walls at the plain storey height, leaving a slot under Floor 1 the size of the other plate's lift. A base plate that carries the storey above (upperStoreyFootprints, the same set that lifts that storey) now tops out at the upper storey's floor, so its walls and ceiling bound rise to meet it. Its floor stays on grade: no foundation is forced on it. A plate with nothing above keeps its own height. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
What does this PR do?
Two wall fixes from a fix pass:
repairWallTJunctionsnow splits each affected triangle at the vertices on its edges, joining each one to the opposite corner, so no vertex is invented. Material groups are assigned first and carried to the pieces, so no face is reclassified. Band splitting also interpolates seam vertices from a canonical endpoint, so both triangles on an edge get a bit-identical vertex. Walls without T-junctions are returned untouched.upperStoreyFootprintsset that lifts it) now tops out at that storey's floor: its walls grow taller and its floor stays on grade, so no foundation is forced on it. A plate with nothing above keeps its own height.Golden rebaseline (byte goldens in
viewer/src/systems/wall): only the 40 fixture walls that had T-junctions changed (3199 → 0). Against the previous build, volume differs by ≤ 5e-8, per-material area by ≤ 7e-7 m², and bounds are identical. The other 18 walls stay byte-identical.How to test
Automated (run locally):
bun test srcinpackages/core(6515 pass),packages/viewer(951 pass),packages/nodes(5185 pass),packages/editor(2829 pass);tsc --buildfor core and viewer. New tests:wall-t-junctions.test.ts(fails with 117 T-junctions on a windowed wall without the repair) and the shed case infloor-foundation-lift.test.ts(fails with a 0.5 m gap without the fix).Screenshots / screen recording
Not added yet.
Checklist
bun devbun checkto verify)mainbranch🤖 Generated with Claude Code
Note
Medium Risk
Changes wall mesh generation and storey covering-plane math used for wall tops; both are regression-tested but affect visible geometry and multi-plate floor stacks.
Overview
Fixes two wall-related issues: baked mesh light leaks and gaps under a raised upper floor over an unraised neighbour.
T-junction repair (viewer) adds
repairWallTJunctions, wired through newfinishWallFacesafter material classification and finish-band splitting. Triangles whose edges carry another vertex are split so neighbours share vertices—avoiding cracks when GLB export quantizes positions. Finish-band clipping now interpolates seam vertices from a canonical edge endpoint so adjacent triangles get identical seam coordinates. Golden hashes and CSG disposal expectations are rebaselined (same volume/bounds within tight tolerances).Storey wall height (core) updates
resolveCoveringSlabContextso base plates listed inupperStoreyFootprintsfor the level above cap their footprint plane atmax(authoredHeight + lift, floorToFloorHeight). Walls on an unraised plate under an extended upper floor grow to the lifted storey floor while the plate stays on grade (no forced foundation). A new test covers extending Floor 1 over a shed after lifting the house footprint.Reviewed by Cursor Bugbot for commit a69fba5. Bugbot is set up for automated code reviews on this repo. Configure here.