Conversation
The /next house door-threshold strip collapses to a two-point line once its edges seam onto the wall centerline, and buildSlabGeometry throws reading the missing position attribute (geometry.ts:121). Covers empty, short, zero-area, raw collapsed, fully holed, interior-holed and valid polygons, plus repeated rebuild and disposal across collapse. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A slab whose renderable polygon collapses once its edges snap to wall faces or sibling seams (a door-threshold strip inside a wall band) left generateSlabGeometry returning a geometry with no position attribute. buildSlabGeometry then threw on every frame, the geometry system never cleared the node's dirty flag, and neither the editor nor /bake settled. - viewer: treat rings with fewer than three points or no area as collapsed, for the whole polygon and for each region after hole cuts, so a zero-area ring no longer grows full-height side-wall fins. - nodes: count triangles safely on an empty geometry, emit no mesh for a slot without triangles, and skip the terrain fill of an empty slab. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
I hit an error while handling your request (Model unavailable on AI Gateway free tier: Free tier users do not have access to this model. Upgrade to paid credits at https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%3Fmodal%3Dtop-up for unrestricted…). Please try again, rephrase, or reach out if it keeps failing. Error id: 37486602-700a-4643-881c-b20d9f4ab99e |
A 1 m x 0.5 um interior hole passes the point-count filter and emits double-sided hole-wall quads: 40 triangles where the plain slab has 12. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Holes were filtered by point count only, so a sliver hole below the collapse area still grew double-sided hole-wall fins. Filter them with the same collapsed-polygon test as the outer contour. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This branch has not been deployed
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?
Fixes B1 from the building-fidelity benchmark (plan item A-04): a slab whose renderable polygon collapses throws in
buildSlabGeometryon every frame. The editor and/bakethen never settle.getRenderableSlabPolygonsnaps slab edges to wall faces and sibling seams. A door-threshold floor strip about 0.11 m wide that lies inside a wall band seams onto the room floors on both sides, so both long edges project onto the wall centerline and the ring collapses to two points.generateSlabGeometryreturns a geometry with nopositionattribute for that ring.splitSlabFacesByFacingthen readposition.count(nodes/src/slab/geometry.ts:121) and threw. The geometry system never reachedclearDirty, so it rebuilt and threw again every frame, and it also skipped every dirty node after the slab in that frame. On the /next house, 14 slabs hit this.systems/slab/slab-system.tsx): the existingpolygon.length < 3guard becomesisCollapsedPolygon, which also catches rings with (near) zero area. It applies to the whole polygon and to each region left after hole cuts, for solid and recessed slabs, and to every hole ring. Before this, a zero-area ring with three or more points, or a sliver hole, still grew full-height wall fins.slab/geometry.ts): following the viewer guard, the builder counts triangles safely on an empty geometry, emits no mesh for a slot that has no triangles, and skips the terrain fill when the slab body is empty. A collapsed slab builds an empty group, the geometry system clears its dirty flag, and the scene settles. The slab node stays in the graph unchanged, and nothing about valid slabs changes.House effect: native recall does not change, because the benchmark converter still filters these slabs. A-05 will remove that exclusion and measure the recovery.
The failing test was committed first (e422020): 6 of the 11 slab builder tests failed with
TypeError: undefined is not an object (evaluating 'position.count')atgeometry.ts:121. That includes the raw /next house strip:slab_floor-utility-2,wall_utility-east, and the two sibling floors.How to test
bun test src/slabinpackages/nodes: 44 pass. New cases cover empty, fewer than three points, zero area, the raw collapsed house strip, a hole covering the whole slab, an interior hole and valid slabs, plus repeated rebuild and disposal across collapse and recovery.bun run testinpackages/viewer: 368 pass. New viewer cases: a zero-area ring builds no side-wall fins (failed before the fix), a zero-area interior hole grows no hole-wall fins (failed before the fix: 40 triangles instead of 12, committed first in e50a0ff), and a hole covering the whole slab leaves no triangles.bun run check: clean.Proof
src/slabsrc/systems/slab8 pass, 0 fail (before the fix: both zero-area cases fail); full suite 368 pass, 0 failbun run checkbun run check-typeseditor(apps/editor) fails only on the uninstalled git dependency@webxr/pluginin the private-editor worktree. That is environmental, and this PR does not touch the appBrowser proof: pending the M5 lock (critical-path reservation). I will add the editor settle and
/bakereceipts for the raw probe scene here.Rules R1–R9
def.geometrystays opaque. The slab builder returns an emptyGroupfor a collapsed polygon, which the generic geometry system already handlesScreenshots / screen recording
N/A: this is a geometry robustness fix. The browser receipts for the raw probe are above.
Checklist
bun dev(probe scene in the hosted editor and/bake, see proof)bun checkto verify)mainbranch🤖 Generated with Claude Code