Skip to content

[For discussion] Terrain: shape the ground, seat a house, terraces, a hillside, the view under a slope - #1288

Draft
AxiomeCG wants to merge 11 commits into
pascalorg:mainfrom
AxiomeCG:cut/terrain-for-discussion-20261116
Draft

AxiomeCG wants to merge 11 commits into
pascalorg:mainfrom
AxiomeCG:cut/terrain-for-discussion-20261116

Conversation

@AxiomeCG

Copy link
Copy Markdown
Contributor

Draft, for discussion, not for merge. This is the lab's whole terrain work, cut onto main (abd6eee9f). It is here so the team can look at it, run it and decide how to take it. It is not a request to merge it.

Branch cut/terrain-for-discussion-20261116, 11 commits: 6 layers, then 5 repairs found while making the pictures (D41, D43, the notation guard).

What it is for

Today the editor's ground is one height field on the site (site.terrain), and you shape it with a brush. A house sits at height 0 whatever the ground does under it.

This branch lets a person, or an agent, work with ground that is not flat:

  • Shape the ground. Sculpt it with the brush on a tiled terrain. Set a plane. Grade along a line, for example a drive at most 18 %. Carve a pad. Grade around a house.
  • Seat a house. seat_house puts the house on the ground with a full-height storey. It has strategies: balance, walk-out, hillside, an areaway, retaining walls. It also re-solves the steps to the doors.
  • Terraces and breaks. A cliff, a retaining wall or a soil face is a real edge in the ground (terrain-break). add_terraces builds stepped terraces.
  • A hillside. The hillside strategy cuts the house into the slope and reports what it could not do (unmet).
  • The view under a slope. The eye counts as under the ground only where ground is actually drawn. That means the sculpted lot up to the property line, and past the line the horizon disc. The orbit rests on the floor of a seated house, not on the datum. A walk-out's lower room is in daylight.
  • Read the ground. read_terrain_facts says where water runs to a wall, which doors and windows are below ground, which faces are unheld, and which drives are too steep. verify_scene reports a slab or a wall that straddles a terrain break.

Size

git diff --shortstat upstream/main...HEAD: 253 files, +32,986 / -736. Code is +19,129 / -574 (168 files). Tests and fixtures are +13,857 / -162 (85 files, 42 %).

The per-package and per-layer tables below were measured on the first 6 commits; the 5 repair commits add about 530 code and 1,000 test lines in core, nodes and editor.

Package Code files Code + / - Test files Tests + / -
core 74 +12,501 / -177 42 +8,888 / -17
nodes 57 +5,077 / -154 22 +2,718 / -3
editor 11 +547 / -167 5 +590 / -109
viewer 4 +76 / -6 3 +100 / -4
mcp 3 +167 / -2 4 +552 / -2
apps/editor, scripts, plugin-evals 3 +231 / 0 0 0

By commit:

Commit Layer Files Code + Tests +
0e7b7b33d core: node kinds, stored format, terrain authority, draped slab, floor-plate fix 71 4,284 2,475
b0e3deda1 core: the 16 terrain agent operations and tools, plus the verify_scene, get_node and delete_node additions 43 8,209 6,403
51b441bfc viewer and editor camera: underground on slopes, orbit floor, implied-ground switch 16 187 261
3b95a39f8 nodes: composite ground, break faces, tile, break and ramp renderers, smooth-ground switch 79 5,077 2,718
4267fc1ae editor: sculpt on tiles, grade along a line, site-plan outlines, palette tile 10 451 439
eab0951f4 mcp: serve the tools, measure a break, annotation policy 9 391 552
2d15eb4fa, b23b94ded D43: a room keeps its floor when a plate is merged back; floorless rooms and split floors read on terrain
6120b27d0, f032655ee D41: a room's floor elevation is read relative to a base that follows the ground
83f02924d the notation guard back to exact paths for the terrain tools

Every commit builds on its own. At each one, core, viewer, nodes and mcp build (tsc --build), and editor check-types shows no error beyond main's two.

The order puts the agent operations before nodes and editor because the terrain-break draw tool and the panel's grading call them.

By feature (added lines, approximate, by path):

Feature Code Tests
Terraforming, terraces and facts (agent operations) 7,725 6,328
Ramp kind (schema, cut and fill, renderer, tools) 3,211 656
Terrain-break kind and its split ground 2,709 2,836
Terrain authority and field (core lib) 1,626 733
Ground rendering (nodes/site) 908 427
Draped slab 631 232
Terrain-tile kind 453 623
Editor sculpt and camera 465 419
MCP and annotation policy 391 338
Viewer 76 100

What the team must agree on: node kinds and stored format

Four format changes. Each one is stored in scenes, so it is hard to take back once shipped.

  1. terrain-tile (new kind, child of the site). A 32 m tile holding 65 × 65 Int16 height samples, base64 encoded, with a quantization step (default 0.01 m). Authored ground is written as tiles. The tools no longer write site.terrain. The old field stays as a frozen legacy layer that the tiles override.
  2. terrain-break (new kind, child of the site). A line in site XZ metres, a kind (cliff, retaining or soil), and left and right sides, each a height or 'ground'. The line is either open and straight or a simple convex counter-clockwise ring. The kind has strictMutations, and the relation check refuses breaks that cross or touch.
  3. ramp (new kind, child of the site). A centreline made of line and arc segments, with heights at both ends, transitions, a width and optional retaining sides. It also carries a terrainEffect receipt: the cut and fill it applied, so deleting the ramp gives the ground back. Why it is here: the terrain authority reads ramp cuts as part of the ground, so the kind has to be in AnyNode. Every AnyNode kind needs a definition, so the ramp comes whole, with its renderer, tools and add_ramp. It could be a PR of its own (see the split below).
  4. slab.terrainMode ('flat' | 'draped', optional). A draped outdoor slab follows the ground, and its elevation is read as clearance above it. This changes support election in the spatial grid for every scene that has a draped slab. There is no tool and no UI for it in this branch. On main nothing writes it yet.

Ground reading changes too. The authority now continues past the field as the field's own context plane instead of holding the edge height. Two existing expectations change because of this, as the lab changed them: get_site on a far-off field now reads 0 m of fall, and the first-person collider reaches ±1015 m (the lot) instead of ±1008 m.

Switches, and what has no switch

Off by default:

  • Smooth ground beside a terrain break. Faceted by default, which is today's lab look. Turn it on with setTerrainBreakGround('smooth') or NEXT_PUBLIC_PASCAL_TERRAIN_BREAK_GROUND=smooth.
  • Implied earth under the ground. useViewer.undergroundLook.ground: 'drawn' by default, 'implied' to turn it on.

No switch. All of the following are on as soon as this lands:

  • The 16 terrain tools are in AGENT_TOOL_CONTRACTS and the MCP. That means the editor MCP, the hosted MCP and the in-page panel all serve them. The lab's tool switch is not in this repository.
  • The Terrain break tile in the Build palette. The Ramp also appears in the palette's advanced section: like every registered kind with paletteSection: 'structure' and a floor-plan tool, it is listed by apps/editor/lib/build-palette.ts.
  • The sculpt panel's additions.
  • The new verify_scene finding terrain_break_straddled. It only fires on scenes that have breaks.
  • get_node and measure on a site now add breaks: [], or the break facts.
  • Support election for draped slabs, and the floor-plate rules below.

Changes to main's own code that need a decision first

  • The piers rule (terrain-support-query.ts, lab commit 832c718a5): if (!isSiteDatum(baseWorldY) && building?.groundLevelId !== levelId) return null. A house that names its ground level and stands on piers opens differently after this change. This is open lab decision 11, and defect D24 has not been rendered.
  • Floor-plate thickness (from e9defc6e4: floor-foundation-datum.ts, floor-intent-changes.ts, derived-node-guard.ts). A floor put back under its own underside moves whole and is never stored thinner than a slab. The arithmetic it fixes is on main, but no main path has been shown to reach it.
  • The walk-out rule in verify_scene: a ground level is no longer called unseated when the level under it is partly below grade.
  • groundHeightAt(site, nodes, x, z): this exported core function takes the scene's nodes now, so that it reads tiles and breaks. Any caller outside this repository breaks.
  • The eye past the property line: past the line, the eye is measured against the ground drawn there (the horizon disc), not the height field. This moves where the dark mode starts on every sculpted lot. It is a look decision, still open in the lab. Taking it out is a small change in underground-ambiance.

Non-terrain lab code this branch had to take

Each item is here because the terrain code would not build or pass without it:

  • The ramp kind, whole. The terrain authority reads ramp cuts, and AnyNode needs a renderer for every kind. Comes with add_ramp and the release of ramp ground on delete_node.
  • createSceneSpatialGrid: a 5-line helper over createSnapshotSpatialGrid, used by the drape tests.
  • getWallTopLowest in services/storey: the unguarded-drop reading uses it.
  • live-previews moved from store/ to lib/. The terrain source reads it without loading the store; structure-reconcile's clean-bundle test checks this.
  • Site-plan contributors: site-scoped kinds (ramp, terrain break) draw their own outline on the site plan.
  • unguarded-drop-observations.ts: terrain-break observations use it. It is not wired into verify_scene on its own.
  • rock/material.ts: the stone colour of a cliff face.
  • The draped-slab slice of b1929b5bf: spatial grid, item support, stair rise, circulation and layout clearance, and slab geometry. Terrain facts read draped surfaces. The slab panel's drape toggle was not taken, because main has rewritten that panel.

Where this differs from the lab

  • unguarded-drop-observations.ts leaves out the roof-wall guards. They need the lab's roof body and outline (a large non-terrain chain), so roof parapets are not counted as guards here.
  • The zone-along-wall stretches that terrain facts read are in a small file of their own (building/zone-wall-stretches.ts). They are copied verbatim from the lab's room-light-check.ts, which drags in the roof chain.
  • The 2D tools of ramp and terrain break draw in the floor-plan frame only. main's FloorplanToolContext has no drawingType.
  • The verify_scene walk-out check reads levelGradeStanding instead of the lab's per-level field.
  • N1 notation is owed on some fields of 6 tools (add_ramp, add_terrain_break, read_site_terrain, read_terrain_contours, sample_terrain_line, shape_site_terrain). The notation test lists those exact field paths (written from the input schemas, each checked to still exist and still be bare); every other field of those tools stays under the guard, and their unit-aware fields have fixed conversion cases. Seven ratio and percent fields join NOT_LENGTHS.
  • 5 core tests are skipped, each marked with the reason. They need sibling tools this branch does not carry:
    • terrain-facts: 2 need add_site_surface and 1 needs add_steps.
    • terrain-seated-ground: 2 need add_steps.
  • Fixtures left out. Four stored-scene fixtures (.json.gz) and their tests were left out: seated-scene-load.test.ts, terrain-block-base.test.ts, stored-seated-scene-open.test.ts, and one case of terrain-bounds.test.ts.
  • Not taken. Terrain tools in run_batch (BATCHABLE_TOOLS). Revealing tiles when a lot grows (lot-growth.ts with the revealRelated capability). MCP README and agent-guide text. add_site_surface, add_steps, add_rock and guard_edges.
  • i18n. The palette label id app.lib.buildPalette.terrainBreak is not extracted into the catalogs. The terrain-break and ramp panels use plain English strings.

Gates on this branch

All run one test process at a time, after a clean rebuild of core, viewer, nodes and mcp. The baseline is an untouched main worktree. The table was taken on the 6-layer head; after the repairs and the rebase on abd6eee9f, core is 7,802 pass, 8 skip, 0 fail and nodes 5,613 pass, 2 skip, 0 fail (re-run by the reviewer).

Gate This branch Baseline main
Build core, viewer, nodes, mcp (tsc --build) pass pass
core check-types (contracts) pass n/a
editor check-types 2 errors the same 2 errors
apps/editor check-types (next typegen && tsc) 0 errors 0 errors
biome on the touched files (213 checked) 0 errors, 5 warnings, 32 infos n/a
core bun test src 7,731 pass, 8 skip, 0 fail 7,184 pass, 3 skip, 0 fail
viewer bun test src 1,569 pass, 1 fail 1,567 pass, 1 fail (the same test)
nodes bun test 5,610 pass, 2 skip, 0 fail 5,512 pass, 1 skip, 0 fail
editor bun test src 2,769 pass, 0 fail 2,761 pass, 0 fail
mcp bun test 1,544 pass, 0 fail 1,531 pass, 0 fail
apps/editor bun test lib 78 pass, 0 fail 77 pass, 1 fail
scripts/openai-tool-annotation-policy.test.ts 5 pass n/a

Notes on the table:

  • editor check-types: main's two errors are both in ceiling-bracket-batch.test.ts.
  • biome: the 5 warnings are the lab's useExhaustiveDependencies in the ground renderers.
  • viewer: the one failure, on both trees, is "GlbScene resolves replace renderers through its sceneNodes" (document.body undefined).
  • core skips: of the 8, 5 are this branch's and 3 are main's.
  • nodes skips: the extra one is terrain-reveal.test.ts, a cost probe that runs only when SCENE_JSON points at a scene file.
  • render bundle: bun run check:render-bundle passes on the head.
  • apps/editor: the baseline failure is an environment artifact. The viewer's theme.css was not copied into the baseline's dist.
  • Goldens: none was re-recorded. Two existing test expectations were changed to the lab's: get_site on a far-off field, and the first-person collider's ±1015 m. Both are explained in the commits.

Known defects and what is not done

From the lab's terrain audit (the defects found in the picture series are listed further down):

  • D23: a stored seated house with a stale floor plate was healed on open in a real tab on the lab head this code comes from; it is not reproduced by a test here (the stored-scene test was dropped with its fixture).
  • D24 (S2): a house on piers. See D33b below; the piers rule changes how a lifted house opens.
  • D2, D8 (S2, S1): grade_around_house {}. It fills a plinth, or digs a pit under a basement. The tool is unchanged on purpose; seat_house is the cure.
  • D3 (S2): a filled carve pad ends in a bare step. A fact (steep_bank) says so.
  • D11 (S3): a guard fence outlives its drop.
  • Still open in phase 2:
    • On a non-convex outline, the hillside strategy excavates the hull.
    • A second seat with another strategy starts from already graded ground.
    • add_terraces takes only a straight line and rectangles.
  • Performance. A terrain break rebuilds the ground with flat shading by default: about 5.8 times the vertices, and slower dabs. The smooth switch brings one sculpt dab from about 262 ms to about 15 ms on a test scene with breaks.

Pictures

All pictures are of a plain test house built by the tools (an L of 9 x 16 m, rooms named Living, Room 1, Room 2, Garage), never a client scene. Rendered in a real editor tab on the lab head this branch was cut from.

  1. [image 1] Seating a house on a 20 % and a 35 % slope (hillside strategy, areaway, retaining).
  2. [image 2] The balance seat on four sloping lots: the low line round the house.
  3. [image 3] Terraces that touch, with their flights.
  4. [image 4] A walk-out on a house with a lower level.
  5. [image 5] Steps re-solved after a seat; steps to the ground under a lifted house.
  6. [image 6] A drive graded along a line (12 % refused with its reason, 18 % accepted).
  7. [image 7] Swales.
  8. [image 8] A cliff edge behind the house.
  9. [image 9] Ramp sides, plain and retained.
  10. [image 10] A house lifted on piers.
  11. [image 11] Smooth ground beside a terrain break, switch off and on.
  12. [image 12] The underground view diving beside the house, undergroundLook.ground 'drawn' and 'implied'.
  13. [image 13] The underground view entering the hill at eye level, same switch.
  14. [image 14] Defect D41: the floor splits when the ground rises under a house built with create_story_shell.

Known defects found after the build (from the picture series)

Severity: S2 = wrong result a person would not notice; S3 = wrong or missing, visible; S4 = cosmetic.

  • S2, D26 The default hillside seat buries windows and the rear door (up to about 1.3 m below ground) and says nothing; only the areaway option clears it.
  • S2, D27 verify_scene does not see buried openings or earth against walls; only read_terrain_facts lists them.
  • S2, D38 A 6 m cliff 1 m behind the house: no guard is added and verify_scene says nothing (only house_at_drop_edge in the facts).
  • S2, D33b Opening a scene re-seats the plate of a house the person lifted by hand on piers, without a word.
  • S3, D28 The batter stops at the property line and leaves a step (up to about 3 m on a 35 % lot); said in unmet.
  • S3, D29 The default seat leaves a bare vertical soil face behind the house; retaining and areaway are opt-in, with no warning.
  • S3, D30 Flights added by add_terraces raise stair_has_no_landing (4 and 6) in verify_scene.
  • S3, D31 No guard along retained terrace edges of about 1 m, and no finding; the lower 3-step flight has no handrails.
  • S3, D35 The walk-out strategy leaves the upper level's downhill door 2.75 m above the ground, with no stair and nothing in unmet.
  • S3, D36/D37 Swales 0.4 m deep are nearly invisible in renders; one swale call returns no drains block and verify_scene has no swale finding.
  • S3, D40 A ramp's end stays a few centimetres off the ground and the garage sill 0.3 m above it; verify_scene says nothing about ramps; 18 % passes without a warning.
  • S3, D34 A pale patch appears on the ground in front of a lifted house; cause not found.
  • S4, D32 Banks at the ends of terraces render as blocky 0.5 m steps with the faceted ground (the smooth-ground switch fixes it, picture 11).
  • S4, D39 A cliff face renders as a stretched, blurred rock texture.
  • The low line round a seated house leaves a gutter up to about 0.7 m under the wall foot; the facts give its depth but no outlet.

Fixed on this branch after the build

  • D43 fixed (commits 9e581c77b, 8d574e08d): a room carried by a standing automatic plate keeps its floor when an older plate disappears (the reconcile after a paused call no longer reads it as a deletion); read_terrain_facts reads floorless enclosed rooms' walls and doors and names them (room_without_floor); seat_house says when a room has no floor plate and is not seated.
  • D41 fixed (commits 6120b27, f032655; picture 14 shows the defect before the fix). A house built with create_story_shell kept its shell's floor elevation on one zone; when the ground rose under the house, the floor split into plates 2 m apart and a room was left with no floor. Now a room's stored floor elevation E is read relative to the automatic base B that follows the ground: it resolves to E + B − 0.05 m, so the intended step (E − 0.05) is kept. On flat ground (B = 0.05) nothing changes. A stored scene that was already lifted and split is repaired on its next reconcile. Authored foundation heights, keyed floors, suspended floors and manual slabs keep their rules. floor_split stays as a guard for real steps beyond tolerance. Also: walls of a floorless room on a lifted house stand at the plate; seat_house grades under a floorless wing like the rest of the house; floorless open rooms (a porch) are read by the terrain facts.

Existing tests this PR changes

28 test files that exist on main are modified (63 hunks). Each hunk was classified: 44 add cases only, 8 update a count or an inventory for the added kinds and tools, 15 change an existing expectation because the behaviour deliberately changes, 0 loosen an expectation to fit the code (the one found was restored to exact paths). The 15 behaviour changes:

  1. scene-view.test.ts: the missing-plugin roof case uses a genuinely unregistered roof-plane kind; its expected frame is unchanged.
  2. notation.test.ts: tolerates the listed metres-only field paths of six terrain tools (exact paths only).
  3. site-ground-height.test.ts: groundHeightAt is passed the scene's nodes so it sees tiles and breaks; every expected height is unchanged.
  4. structure-reconcile.test.ts: a stored 0.42 m room intent above a 0.65 m moving base gives a 1.02 m platform (a 0.37 m step) instead of an absolute 0.42 m sunken plate (D41).
  5. terrain-source.test.ts: returns a cached composite terrain authority instead of the identical input field; the sampled 2.5 m height is unchanged.
  6. room-built-on.test.ts: with the 0.15 m shared base, the neighbouring stored-0.30 room walks at 0.40 m (D41).
    7-10. terrain-sculpt.test.ts: a half-metre editing lattice covering the lot; the brush minimum no longer grows with a larger lot or a coarse imported base; the flatten read includes the scene's nodes (expected 3 m unchanged).
    11-12. raised-room.test.ts: a fixed 0.55 m step above the moving base instead of a fixed absolute 0.60 m platform top, in the store and in the rendered raycast (D41).
  7. build-collider-world.test.ts: the walkable skirt reaches the full 30 m lot (X bounds ±1008 m to ±1015 m), with the matching Z bounds.
    (Some items cover two hunks of the same file, hence 15 hunks in 13 items.)

Open questions for the team

  1. Size. The team called a 15k-line PR too much, and this one is 33k (42 % tests). Proposed split, each PR building on the one before:
    1. Terrain tiles and the authority (core). The terrain-tile kind, the tiled authority, the continuation past the field, and the live-preview move. About 2.1k code and 1.4k tests. Changes no tool.
    2. Terrain breaks (core and nodes). The terrain-break kind, validation, the split ground (faceted by default, smooth behind the switch), the break faces, the draw tool, and add_terrain_break. About 2.7k code and 2.8k tests; tests to trim, including the golden hashes.
    3. Ground rendering and the underground view (nodes, viewer, editor camera). The composite ground, the orbit floor, the eye past the lot (if agreed), and the implied ground. About 1.5k code and 1k tests.
    4. The older terrain tools (reads, shape_site_terrain, carve_terrain_pad, grade_around_house, set_site_lot) and the sculpt panel. About 2.5k code.
    5. Terraforming (seat_house, set_terrain_plane, grade_along_line, add_steps_to_ground, add_terraces, read_terrain_facts), with the floor-plate and piers rules once decided. About 5k code and 5k tests; needs the most trimming.
    6. Ramp and draped slab as siblings. They could also come before 4.
    • Each PR keeps "off = main" where a switch exists. The team should say whether the agent tools need a switch in the public editor too.
  2. Stored format. Tiles instead of site.terrain: is the team fine with a frozen legacy layer plus tiles, and with a 0.01 m quantization? Should breaks and ramps be site children?
  3. Tools without a switch. Should the terrain tools be behind a word on main (MCP, hosted MCP, in-page panel), or offered only in a "casquette" (trade-focused mode) or Landscaper context?
  4. Test share. 41 % tests, including golden hash files that pin the faceted build byte for byte. Which of these does the team want kept?

🤖 Generated with Claude Code

AxiomeCG and others added 11 commits November 17, 2026 09:47
…ground they make

For discussion, not for merge: the lab's terrain work cut onto main, first layer.

Three node kinds join AnyNode, each a stored-scene format to agree on:
- terrain-tile: a 32 m tile of 65 x 65 quantized height samples (base64 Int16),
  child of the site; authored ground is written as tiles, not into site.terrain.
- terrain-break: a vertical boundary in site XZ metres (cliff, retaining or soil),
  open straight line or convex CCW ring, numeric or 'ground' sides; strict mutations,
  relation checks refuse crossing or touching breaks.
- ramp: a site-owned centreline ramp with endpoint heights and a cut-and-fill receipt
  (terrainEffect) the ground can be restored from.
Slab gains an optional terrainMode ('flat' | 'draped'): a draped outdoor surface
follows the ground, its elevation read as clearance.

The terrain authority reads one ground from the legacy field, the tiles, the breaks,
the ramps' cuts and a continuation past the field; previews are made once per edit.
The spatial grid, stair rise and floor-placed elevation read a draped slab's height
at the point. A floor plate put back under its own underside moves whole and is never
stored thinner than a slab.

Taken from the lab line because terrain needs them: createSceneSpatialGrid (a 5-line
helper over createSnapshotSpatialGrid), getWallTopLowest in services/storey, and
live-previews moved from store/ to lib/ so the terrain source reads it without
loading the store.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sixteen shared tools in AGENT_TOOL_CONTRACTS, with their operations:
- reads: read_site_terrain, sample_terrain_line, read_terrain_contours,
  describe_terrain_under_house, read_terrain_facts;
- writes: set_site_lot, shape_site_terrain, carve_terrain_pad, grade_around_house,
  add_terrain_break, add_ramp, seat_house (strategies: balance, walk-out, hillside,
  areaway, retaining), set_terrain_plane, grade_along_line, add_steps_to_ground,
  add_terraces.
verify_scene reports terrain_break_straddled (a slab or a wall across a break, with
both sides' heights and the drop); get_node on a break or a site adds the break facts;
delete_node of a ramp gives its ground back. A walk-out's ground level is no longer
called unseated by verify_scene.

No switch: the in-page panel lists core's contracts, so it serves these tools as soon
as they are here. The lab's tool switch is not in this repository.

Differs from the lab: the roof-wall guards are left out of the unguarded-drop reading
(they need the lab's roof body), the zone-along-wall stretches the terrain facts read
are a small file of their own, six tools read lengths in metres only
(METRES_ONLY_TOOLS: the one notation, N1, is owed on them), and five tests that need
add_site_surface or add_steps (siblings not carried) are skipped with the reason.
get_site past a far-off field reads the field's context plane, as the lab changed
that case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The eye under the ground is measured against the ground the site actually draws:
the sculpted lot to its property line, and past the line the horizon disc under the
block's base (groundPastLot, set by the site renderer). groundHeightAt takes the
scene's nodes, so the underground ambiance reads tiles and breaks, not only
site.terrain. The orbit rests on the floor of a seated house, not on the datum
(level-orbit-floor), and on Solid the sculpted ground holds the eye inside the
property line only; the walkthrough stands on a walk-out's floor where the ground is
drawn open over it.

undergroundLook gains ground: 'drawn' | 'implied'. 'drawn' (the default) is what
main does today; 'implied' draws no ground under the ground on any lot, so the inside
of a hill looks like the underside of a flat lot. Off by default.

Past the property line the eye is measured against the disc, not the field. This
moves where the dark mode starts on every sculpted lot: a look decision for the team.

The first-person collider reaches past the lot as well as the field: its test's
expectation moves from +-1008 m to +-1015 m (the default 30 x 30 m lot reaches past
the 16 m field), as the lab changed it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…th break ground behind a switch

The site renderer draws one composite ground when a site has tiles, breaks or a live
stroke: patches cut to the lot, a skirt along the property line, the horizon disc
past it, holes for ramps and recessed slabs, and the faces of each terrain break
(cliff in stone, retaining wall, soil). A tile wholly outside the property line is
kept and not drawn. A stroke reads and uploads only the skirt points and meshes it
can reach.

Renderers and definitions for the three kinds: terrain-tile (no tool of its own),
terrain-break (draw tool, 2D tool, panel), ramp (draw tool, 2D tool, panel, site-plan
outline). A draped slab is built on the ground under it.

Switch: the ground beside a terrain break is faceted by default (as in the lab);
setTerrainBreakGround('smooth') or NEXT_PUBLIC_PASCAL_TERRAIN_BREAK_GROUND=smooth
shades it smooth. A switch for the implied earth under the ground follows the viewer's
undergroundLook.ground, off by default.

Differs from the lab: the 2D tools of ramp and terrain break draw in the floor-plan
frame only (the lab reads a drawingType main's FloorplanToolContext does not have).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The sculpt tool, its grid, cursor and panel write strokes against the scene's
terrain authority (tiles, breaks, the continuation past the field), and the panel
grades along a line (editor/lib/terrain-grade). Site-scoped kinds (ramp, terrain
break) draw their own outline on the site plan. The Build palette gains a Terrain
break tile.

Not switched: the palette tile and the sculpt panel's additions. The palette label's
i18n id (app.lib.buildPalette.terrainBreak) is not extracted into the catalogs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The sixteen terrain tools join SHARED_TOOLS with their output schemas and
annotations (read-only reads, destructive writes, add_steps_to_ground additive), and
the OpenAI annotation policy and justifications list them. measure of a break or a
site against itself adds the break facts; a ramp, a terrain tile and a terrain break
each resolve a world point.

No switch: the editor MCP and the hosted MCP serve these tools as soon as they
are here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…less rooms and split floors on terrain

A reconcile against an older baseline (the editor's reconciliation paused for an agent call, then
resumed) read a floor plate the derivation itself had merged into another as a plate the person
deleted, and switched its rooms' floor off: delete_zone keep on the shell room, then the room drawn
again, left the garage with hasFloor false. A room a standing plate still carries now keeps its
floor; a plate deleted by hand is still recorded by the store's own deletion intent.

read_terrain_facts read only walls with a floor plate on one side: the walls and doors of a room
with no floor plate (a garage, hasFloor false) were skipped. They are now read, a wall with no plate
inside it from its own foot, and the room is named (room_without_floor). seat_house says such a room
is not seated and keeps its findings after the seat.

A floor split by the ground is said: shared base plates of one floor at different heights, and a
room whose stored floor elevation stayed behind while the ground moved the floor that rests on it
(floor_split).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d only within one house

floor_split now names a room whose own floor elevation stands more than the floor-lift limit
(0.15 m) off the floor the ground has moved, not only past half a metre: a 5 % rise that leaves the
living room 0.40 m under the rest is said. Shared base plates at different heights are compared
only when a room joins them or they touch: a detached shed on the same level, on its own ground,
is another floor and no longer keeps an open finding after every seat.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Read stored room heights relative to an automatic shared ground-following
base, with 0.05 m as the unchanged flat-ground datum. Keep authored steps,
explicit foundations, separate room floors and suspended floors meaningful.
Already-split saved houses regain their living floor on reconciliation;
stored room intent is not rewritten by a terrain change.

Replace the tests that pinned rooms to absolute heights as the ground rose.
They now assert continuous floors, preserved intended steps and a floor_split
finding only for genuine requested differences beyond tolerance. Exercise
saved synthetic splits, conversion roundtrips and the editing readers too.

Carry attached floorless-room walls at the house plate without generating
a floor, grade beneath their wings, and read open porches in terrain facts.

Co-Authored-By: Codex (gpt-6-astra) via omp <noreply@openai.com>
…ing regression

Read an explicit room height before the separate base fallback so infeasible
own-floor edits are still refused and depressed garage doorways retain their
floor cut. The shared ground-following test now keeps its stored 0.42 m intent
and 0.37 m step instead of pinning a sunken plate while wall support rises.

Give the roof test that requires an unregistered kind a distinct fixture kind.
It must not depend on the package-local registry reset when the whole core
suite is invoked from the repository root. Keep its framing assertions intact.

The slab rendering regression now checks the intended 0.55 m platform step
and raycast top above the moving base, instead of the former fixed 0.60 m top.

Cover the editor's shared-floor summary at flat and raised base heights,
and verify a geometric handle height converts back to relative room intent.

Co-Authored-By: Codex (gpt-6-astra) via omp <noreply@openai.com>
Replace whole-tool exemptions with reviewed bare-number paths and protect notation-aware ramp and shaping inputs with fixed conversions.

Co-Authored-By: Codex (gpt-6-astra) via omp <noreply@openai.com>

This branch has not been deployed

No deployments
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