Skip to content

Remove the generic foundation and the 8 in seat; terrain and skirts meet floors cleanly - #1202

Merged
wass08 merged 4 commits into
mainfrom
fix/remove-generic-foundation
Nov 2, 2026
Merged

wass08 merged 4 commits into
mainfrom
fix/remove-generic-foundation

Conversation

@wass08

@wass08 wass08 commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

What does this PR do?

This removes most of what #1097 drew automatically around a house's foundation and ground, and fixes two places where the ground and a building met badly.

  • The generic foundation is gone. The viewer derived a concrete footing and an 8 in CMU stem under every building's exterior walls. They looked wrong, did not follow terrain, and spread to every shared floor plate. A foundation is now only what the person sets on a floor (set_floor_foundation, the floor construction).
    • Removed with it: the drawsFoundation capability, useViewer.pluginFoundationLevelIds, and the capture helper that hid its meshes.
    • deepestDrawnY is now the lowest floor's underside.
  • The ground floor sits on grade. "Set as ground floor" and set_ground_level used to stand the floor 8 in (0.203 m) over grade, a gap the generic foundation filled. That seat is removed:
    • from the foundation constructions: seatAboveGrade, seatBasis, stemThickness;
    • from the ground seat: aboveGrade, atFoundationTop.
    • A seated floor is one on grade within 5 cm. A building seated 8 in up by the old rule now reads unseated and comes down when it is set as the ground floor again.
    • Basement walls against the earth keep their foundation construction (8 in CMU and furring, cast concrete in Europe).
  • The grade ring is gone. This was the dark ribbon drawn along a basement's outline while the ground is veiled. It read as black wall tops, and the hole already shows where the ground is cut. UNDERGROUND_RING and anyGroundVeiled, which only the ring used, go with it.
  • Foundation skirts reach the drawn ground. A flat site's fill lies 5 cm under the datum (FLAT_GROUND_Y). A base plate's solid foundation, a porch's concrete edge, and a plate filled to the terrain stopped at the datum, so the top of a basement wall showed in the 5 cm gap. They now go down to the ground as the site draws it.
  • Terrain never shows over a floor inside its own plate. The ground was cut only where it stood more than 0.3 m (BELOW_GRADE_TOLERANCE) over a floor. On a hillside, the slope between the floor and 0.3 m over it showed as thin wedges inside a walk-out's rooms.
    • terrainOverFloors returns the part of every visible floor plate that the rendered terrain stands over, and the site cuts the ground there along with the cover under the house.
    • The tolerance still decides grade standing, the hole and the pit.

The private repo's Bones plugin drops its drawsFoundation capability and its pluginFoundationLevelIds claims in the matching bump.

How to test

  1. On a house with no foundation set, look from under the ground: no footing or block course is drawn under the floor plates.
  2. Run "Set as ground floor" on a level: the building moves so that floor sits on grade, not 20 cm above it.
  3. Show a basement level from above: there is no black band on its wall tops, and the hole and pit are unchanged.
  4. On a floor over a basement with a solid foundation, there is no band between the foundation and the ground.
  5. On a hillside walk-out, look inside the lower rooms near where the ground rises: no terrain wedges show over the floor.
  6. Ran locally: bun test src in core, viewer, nodes, editor and mcp; bun run check (no errors). Steps 1–5 were checked by Wassim in the community app.

Screenshots / screen recording

Not added yet.

Checklist

  • I've tested this locally with bun dev
  • My code follows the existing code style (run bun check to verify)
  • I've updated relevant documentation (if applicable)
  • This PR targets the main branch

🤖 Generated with Claude Code


Note

Medium Risk
Large behavioral change to building vertical placement, ground/agent APIs, and 3D ground rendering; saved scenes seated under the old 8 in rule will re-seat when users set ground level again.

Overview
Removes the derived generic foundation (footing + stem under exterior walls), the drawsFoundation plugin hook, and all viewer geometry for it. deepestDrawnY now stops at floor slab undersides, not footings.

Ground seating no longer lifts the ground floor to a region-specific height above grade (8 in block, 15 cm cast concrete, etc.). set_ground_level / the level panel seat the named floor on grade (within tolerance); GroundSeat drops aboveGrade, atFoundationTop, and foundation metadata from agent messages and MCP docs. Foundation construction data keeps wall assemblies only—no seatAboveGrade or stem thickness for seating.

Site rendering: the grade ring veil is removed. New terrainOverFloors outlines cut the rendered terrain wherever it sits over any visible floor plate (including small hillside wedges), separate from below-grade hole logic. Slab foundation skirts and fill-to-terrain extend to FLAT_GROUND_Y so they meet the drawn ground instead of stopping at the datum.

Tests, agent fixtures, and editor ground-line UI are updated (isGround uses seated instead of atFoundationTop).

Reviewed by Cursor Bugbot for commit 8528119. Bugbot is set up for automated code reviews on this repo. Configure here.

wass08 and others added 4 commits November 2, 2026 11:09
The foundation the viewer derived under every building (a concrete footing
and an 8 in CMU stem under the exterior walls) looked wrong, did not follow
terrain and spread to every shared floor plate. A foundation is set
explicitly (set_floor_foundation, the floor construction) instead.

- The generic foundation, its geometry and drawing, the drawsFoundation
  capability and pluginFoundationLevelIds are gone, with the capture helper
  that hid its meshes.
- "Set as ground floor" and set_ground_level seat the ground floor on grade:
  the 8 in (0.203 m) seat over grade, which the generic foundation filled,
  is gone, with seatAboveGrade/seatBasis/stemThickness on the foundation
  constructions and aboveGrade/atFoundationTop on the ground seat. A floor
  seated is one on grade within 5 cm; a building seated 8 in up by the old
  rule reads unseated and comes down when set again.
- deepestDrawnY is the lowest floor's underside (no footing under it).
- Basement walls against the ground keep their foundation construction
  (8 in CMU with furring, cast concrete in Europe).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The dark ribbon along a basement's outline, drawn while the ground is
veiled, read as black wall tops. The hole and its pit already show where
the ground is cut. Its colours (UNDERGROUND_RING, the palette's ring) and
anyGroundVeiled, which only it read, go with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A flat site's fill lies 5 cm under the datum (FLAT_GROUND_Y) so floors at
grade never sink into it, but a base plate's solid foundation, a porch's
concrete edge and a plate filled to the terrain stopped at the datum. The
5 cm gap under them showed what stood behind it: the top of a basement's
foundation wall, read as a band above the ground.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The ground was cut open only where it stood more than 0.3 m
(BELOW_GRADE_TOLERANCE) over a floor, so on a hillside the slope the
terrain interpolates between the floor and 0.3 m over it showed as thin
wedges inside a walk-out's rooms. terrainOverFloors gives the part of every
visible floor plate the rendered terrain stands over at all, and the site
cuts the ground there with the cover under the house. The tolerance still
decides grade standing, the hole and the pit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 8528119. Configure here.

)
const gradeRing = useMemo(gradeRingMaterial, [])
useEffect(() => () => gradeRing.dispose(), [gradeRing])
}, [coverOpen, buried.covered, overFloors, polygonPoints, slabPolygons])

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Solid mode restores terrain wedges

Medium Severity

overFloors is merged into the same coverOpen gate as the basement cover. Viewing a walk-out with Solid ground drops those cuts, so the 0–0.3 m terrain band can show inside the rooms this PR set out to clear. Solid is meant to close the house cover, not put ground back over a visible floor.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 8528119. Configure here.

@wass08
wass08 merged commit f4db3d7 into main Nov 2, 2026
5 checks passed
AxiomeCG added a commit to AxiomeCG/editor that referenced this pull request Nov 3, 2026
Brings in pascalorg#1202 (the generic foundation and the 8 in seat removed) and pascalorg#1204 (sunken garage).
One conflict, packages/mcp/README.md: the set_code_profile row is kept and the set_ground_level
row is upstream's, which no longer mentions the foundation seat. None of the 13 exports pascalorg#1202
removed is referenced by the delivery's code; core, mcp and geometry-script tests and typechecks
pass on the result.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.

1 participant