Skip to content

Sunken garage: openings reach the garage floor, doorway stays open, no veil - #1204

Merged
wass08 merged 5 commits into
mainfrom
fix/sunken-wall-opening-sill
Nov 3, 2026
Merged

wass08 merged 5 commits into
mainfrom
fix/sunken-wall-opening-sill

Conversation

@wass08

@wass08 wass08 commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

What does this PR do?

A wall can go below the floor it stands on: a garage sunk under the house, its wall's face going down to the garage floor. Its openings and the ground view can now follow it.

  • Openings below their floor. author_scene doors and passages take their sill, negative included. Before, every door was written standing on the floor and its sill was ignored. A garage door can now fill its doorway down to the garage floor. add_door gets an optional sillHeight, rarely needed; without it a door stands on the floor as before. The window rule (editor and add_window) lets a window go down to the wall's real bottom, meaning the lowest of its centreline and either face. An opening's wall cut never goes below the wall itself.
  • Doorway floor. An opening that reaches below its floor cuts its doorway, the wall's span plus 2 cm past both faces, out of every floor plate standing above its bottom. That's the band of floor plate left under the wall at the level's floor, which otherwise showed as a bar across the garage door. The plate at the door's bottom is untouched, and a door on its floor keeps its threshold.
  • Grade standing / veil. A floor sunk below its level's floor that opens to the outside through a door reaching down to it (a walk-out garage) no longer makes the level "partly below grade". That floor counts at the level's floor, along with the other plates of the same room, or touching it, at that height. On a level with rooms, a slab outside every room (an entry pad, a stoop) is part of the site, like flatwork, not a floor the ground buries. levelGroundBox (the ground window's target) starts at the lowest such floor, so the window no longer opens round the whole house for a garage.

The opening clamp is deliberately not in getOpeningFloorDatum: the legacy-wall-datum load migration reads parsed legacy doors at [0,0,0] (a negative sill) and would write positions old scenes never stored.

How to test

  1. Make a house with a garage behind one front wall, sink the garage room's floor (set_zone_intent floor elevation −0.68), then add_door on the garage part of the front wall with sillHeight −0.73 (or re-run author_scene with that door's sill). The door and its wall cut reach the garage floor. From outside and from inside the garage, no band of floor crosses the doorway.
  2. Same door with no sill: it stands on the floor as before, threshold included.
  3. On a site with terrain, show that level alone: the level reads at grade (list_levels), and the ground around the house is not veiled because of the garage. Remove the door and the garage reads as a sunken room again (partly below grade).

Automated tests run locally: bun test in core (6513 pass), nodes (5185), viewer (949), editor (2829), mcp (1382), all 0 fail; core and nodes tsc --build; bun check (no errors). Also checked against a converted house (112 Chinaberry Bend) in the local 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
Touches opening placement, wall CSG, plate partitioning, and below-grade classification across author_scene, agent tools, and rendering—high blast radius but covered by extensive new tests.

Overview
Doors and passages can sit below the wall’s main floor via sill / optional add_door sillHeight (negative lowers toward a sunken slab). author_scene now places door/passage Y at sill + height/2 instead of ignoring sill; planWallOpening treats sill like windows (clamp between wall bottom and ceiling) and returns sillHeight when not floor-mounted.

Wall cuts and clamping use wallBottomUnderOpening so openings can extend down to a garage face without cutting past the wall; window vertical clamping uses the same lower bound.

Floor plates subtract plateDoorwayCuts where an opening reaches below the level floor (partition + slab mesh holes), removing the floor strip that blocked garage doorways; a small face overshoot avoids slivers when plate edges are slightly off the wall.

Grade / ground window: slabGradeElevation treats walk-out garages (sunken slab + exterior door to its floor) as judged at the level’s main floor; slabs outside all rooms count as site pads. levelGroundBox uses that lowest judged floor so the ground veil no longer wraps the whole house for a walk-out garage.

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

wass08 and others added 5 commits November 2, 2026 18:36
…arage leaves the level at grade

A wall can go below the floor it stands on (a garage sunk 0.68 m beside the house, the
wall's face going down to it), but openings could not follow: author_scene wrote every door
on the floor and ignored its sill, and the window rule stopped at the floor.

- author_scene doors and passages take their sill, negative included, so a garage door
  (its own module or a type) fills the doorway down to the garage floor.
- clampWindowToWall lets a window down to the wall's bottom under it (centreline or
  either face), not only to the floor.
- An opening's wall cut never reaches below the wall itself.

The sunken garage also made its whole level "partly below grade", so the single-level
view opened the ground window round the house. A floor sunk under its level's floor that
opens to the outside through a door reaching down to it is now judged at the level's
floor: the grade standing, the below-grade outlines and the level's ground box (the
window's target) all leave it out. A sunken room with no such door is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rarely needed: a door stands on the floor as before unless sillHeight is given. With one
(a garage door down to a garage floor sunk beside the wall, a step in the terrain) it keeps
between the wall's bottom and its ceiling, as a window does, and reports clamped and the
sill it got. A railing's gap ignores it and stays on the floor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he level at grade

Seen on a converted house (112 Chinaberry Bend): the garage's floor was two sunken plates,
a sliver touching the main one at a point, and only the plate the door stood on was let
off. Plates at the walk-out floor's height of the same room, or joining it, now go with it.

The same house still read partly below grade over its entry pad, a slab outside every
room whose corner the terrain stood 0.304 m over. On a level with rooms, a slab outside all
of them is the site's (a stoop, a pad), as flatwork is: it takes no part in the standing.

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

On 112 Chinaberry Bend the garage door (an author_scene door, its sill 0.85 m under the
floor) cut its wall down to the garage floor, but the floor plate the wall stands on still
ran across the doorway inside the wall's footprint: a strip across the door from outside,
and from the garage its side face dropping to the garage floor like a panel in the doorway.

An opening with a negative sill now takes its doorway out of every plate standing above its
bottom (plateDoorwayCuts): the partition's top loses it, and the slab mesh takes it as holes
(the builder subtracts holes crossing the outline). The plate at the door's bottom (the
garage floor) is untouched, and a door on its floor keeps its threshold.

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

On 112 Chinaberry Bend the garage door still showed a bar at the level's floor over its
left 2 m. The band of floor plate under the front wall runs 3 mm off the wall's outer face
(slanted against it), and the doorway was cut to the wall's footprint exactly, so a hairline
sliver of the band stayed in the doorway and its 5 cm side face read as a bar. The mesh holes
were also the cut intersected with the plate, which put their edge back on the plate's own
slanted edge.

The doorway is now the wall's span past both faces by 2 cm, cut whole from the plate (top
and mesh), so no edge of the cut runs along the plate's.

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 2 potential issues.

Fix All in Cursor

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

Reviewed by Cursor Bugbot for commit 261b093. Configure here.

: Math.max(
datum + opening.position[1] - opening.height / 2,
Math.min(datum, wallBottomUnderOpening(wall, opening, support)),
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Covered cut ignores opening sill

Medium Severity

The new sill-aware wall-cut clamp never runs when a floor plate covers the doorway. That is the usual garage-door case: a house-level band still sits under the wall. getOpeningWallCut then drops bottom to the wall's physical underside instead of the opening's sill, so a door that only drops partway still opens the wall — and plateDoorwayCuts then punches every plate above that underside — down to the garage.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 261b093. Configure here.

const inside = a.length === 0 ? b : b.length === 0 ? a : []
for (const slab of inside)
if (slab.elevation < floor && bottom <= slab.elevation + BELOW_GRADE_TOLERANCE)
walkOuts.set(slab.id, floor)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Walk-out reach uses grade slop

Low Severity

A sunken floor is treated as opening out when the door bottom is within BELOW_GRADE_TOLERANCE (0.3 m) of that floor. That constant is terrain slop for “ground over a floor,” not a reach test, so a door that stops well short of the garage still lifts the room to at-grade and drops the veil.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 261b093. Configure here.

@wass08
wass08 merged commit cf2ca56 into main Nov 3, 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