Repository navigation
Description
Status: proposed
Part of #3105 (GP12, the crossing block of #3096). One pull request into ground-plan.
The steps of the block, in build order: GP12.1 #3342, GP12.2a #3343, GP12.2b #3352, GP12.3a #3344, GP12.3b #3353, GP12.4 #3345, GP12.5 #3346, GP12.6 #3347, GP12.7 #3348, GP12.8 #3349.
Read first: #3105 (invariant 8 and the costs). On timosPC: /media/timo/OSM1/tmp/ground-plan/water-pickup/STATE-BAKE.md
(section "Wall tops on #3340"), water-pickup/REVIEW-3340.md (finding N2), the pictures
water-pickup/rc-pics/r3/INDEX.md and rc-pics/r4/INDEX.md, and the held attempt on branch
claude/gp-wall-top-attempt (commit aaa4dd3). Short names: gp/ = host/obc-ground-plan/src/, tv/ =
builder/web/src/lib/trailview/. Code places verified on ground-plan ea4da43.
Goal
Every wall of the ground plan has a smooth top along the wall: no step, no facet, no jog, and its ends taper into the
bank. The slope beside a road has no shading bands. #3340 merges with one accepted wall-top step at m3 (46.820804,
8.386169) and with shading bands at m4; this step removes both by one general rule. It is the first piece of the
risk step: every end face of the block takes this top.
Depends on / blocks
- Depends on: ground plan: outline edges cut at the global bin grid and split where their cones' need varies #3340 merged (outline edges cut on the global bin grid and split by need).
- Blocks: GP12.2b (the end faces take this top), GP12.4 (the walls of a cut), GP12.5 (the walls of a subway's way down).
Design
1. Why the top steps today (REVIEW-3340 N2)
fit (gp/faces/heights/mod.rs:966) gives an outline edge piece ONE slope, from the greater need of its two ends, and
a wall at each end up to the cap of Line::wall_max (:379-385; 4.5 m wall_max_m for a wall class, 0 for another).
Its callers are at :1134-1135 and :1291-1292; its WGSL port is h_fit in tv/terrain/heights.wgsl. So along a
rim the slope is a step function: it steps at every piece end. That step is the jog of the wall top at m3 and the
three or four shading bands on the slope at m4. The split by need of #3340 makes the steps smaller and more frequent;
it does not remove them.
2. The rule
- A slope that varies continuously along the rim. Each piece end gets its own slope and its own wall from its own
need (fitper end, with the end's paved height and the terrain where its cone lets go: both are in the outline
edge words of the records today). Along the piece, the slope and the wall height vary linearly between the two ends.
Two pieces that share an end share its values, so nothing steps at a piece end. - The top is an envelope against the ground at the rim. The visible top of a wall is the lower of the profile and
the ground at the rim. A profile that only raises walls stops where the ground at the rim falls below the paved edge
(atm3the rail's uphill wall ends at about 0.8 m as a vertical cut). So: top ≤ (ground at the rim − paved edge)wall_taper× the metres along the wall from where that bound binds, on both sides; and the wall falls to zero at
its ends at the same taper, so no wall ends in a vertical cut.wall_taperis a rule value inplan.json
heights(the attempt's note uses 0.2).
- Cell independence by construction. The rule reads only inputs that two cells hold bit-equal: the piece ends cut
on the global bin grid and their own needs, and the host line's samples. It reads no piece along the outline within
some metres: the attempt read the pieces within 10 m, had to grow the records window from 3 to 5 bins, and still
moved a wall top by up to 0.383 m under a half-bin shift of the cell. - Rust and WGSL change line for line (
heights/mod.rs,terrain/heights.wgsl). The records layout does not change
if the per-end needs come from the existing outline edge words.
3. What the held attempt taught (aaa4dd3)
| Attempt | Result | Lesson |
|---|---|---|
| Split the outline edges by need (in #3340) | the m3 top does not smooth; more shading bands at m4 |
more pieces give more, smaller steps: the slope must vary inside a piece |
| Raise each piece end's wall to the max over the pieces within 10 m along the outline, less a taper | m3 still steps where the ground at the rim drops below the rail; w-steep and w-river better |
the top needs an upper envelope against the ground at the rim, and a read along the outline is not cell-independent |
Invariants
- No step in a wall top. Check:
check::wall_steps(brought from the attempt,heights/check.rson
claude/gp-wall-top-attempt): 36 pairs over the fixture at the base, 13 in the attempt; the gate is set at this
step's count, at most 13. - Two cells give a wall top the same values: the border check per wall top over the fixture, 0 differences; the
half-bin shift test, worst 0.0 m. - The heights gates of
host/obc-ground-plan/tests/heights_fixture.rs(steps with no rule, steep pairs) do not grow. - The Rust heights and the WGSL port agree: the model probe (
tests/browser/trailview/model-probe.mjs) atm3,m4. - A wall stays at most
wall_max_m(4.5 m) high; above it the face steepens as today (the owner's wall rule).
Decisions already made by the owner that apply
- Walls integrate at the bottom, at the sides and ends (the height runs to zero into the bank, no cut-off end), and at
the top (a smooth top line, no stepped top, no visible pattern repeat): "super important". - ground plan: outline edges cut at the global bin grid and split where their cones' need varies #3340: "Merge, fix wall later": the
m3step is accepted only until this step. - Walls at most about 4.5 m; above that a steep rock face.
- No special cases; no repair passes; a torn face is the worst fault.
Not in scope
End faces at structures (GP12.2b). The stone texture's repeat (the wall look of #3166). Mapped retaining walls and wall
caps (#3115, deferred).
Proofs and pictures required before review
- The views
m3-eye,m3-near,w-steep,w-river,w-m4,m4-topand the 13 owner road views of
water-pickup/rc-pics/r4/views.jsonandviews-new.json, before (the base head) | after, one sheet each with label
boxes. The implementer opens every sheet.m3-eyemust show a smooth top with tapered ends;m4-topno bands. - The crossing gallery, all 50 places, before | after (TrailView ground plan GP12: bridges, tunnels, underpasses and galleries: decks, bores and roofs with the ladder (the contract of the crossing block) #3105's rule); the walls at
W1,T01,R02,W5,R11
named in the verdict table. - The owner sees
m3before the merge.
Cost to measure
Base: ground-plan at the branch point (#3340 merged).
- The faces stage time, p50 and p95, native over the fixture. The held attempt raised p95 from 84.9 to 118.2 ms on a
loaded machine: the figure to beat. Measure base and head on one quiet run each. - WASM bytes: the attempt added about 5.5 kB gzip. The owner accepts about 15 to 25 kB for the whole block, this wall
top included; report the bytes. - The near block's bytes (no change expected).
Risks and the stop rule
- Stop and report if the rule needs a per-wall repair pass, a case by place, or a window wider than ground plan: outline edges cut at the global bin grid and split where their cones' need varies #3340's.
- Stop and report if the faces stage reaches twice its base.
- After two failed review rounds, stop and report.
Requirements: the verification console could not be checked from this PC (no agent token here). The orchestrator sets
the pull request's Requirements: line.
Activity
[-]TrailView ground plan GP12.2: the ground at bridge ends: the proof of today's torn walls, ordinary ends, end faces, the ceiling under a deck[/-][+]TrailView ground plan GP12.2a: the smooth wall top: a slope and a wall that vary continuously along the rim[/+]timohueser commentedon Nov 11, 2026
GP12.2a design note: the slope and the wall are values of the rim's vertices
What I measured first (base
ground-pland97131f)A probe along the walls at
m3(heights at both sides of the rim every 0.25 m):straight: a jog of about 1 m/m at the start of each piece. The cause: the two pieces at a vertex have two walls
there (each piece fits its own slope to the greater need of its ends), and the round cone of the end of the one
piece runs over the start of the next.
piece). The wall follows the terrain where the cone lets go (
t), and that terrain has a ridge 10 m up the hill.This is the stone triangle in
m3-near.talong its own normal (45° off the road). So its ends have another need thanthe vertices of its neighbours, and its cone makes the 1.1 m fan.
So two inputs are not values of a position: the slope (a value of the piece) and
t(a value of the rim'sdirection). The rule makes both values of the vertex.
The rule
the terrain where the cones let go, read along the host line's frame, not along the rim: the outward direction is
the frame's across direction at v (in the mitre quad that holds v; past the line's end, the direction from the end
sample to v). t(v) is the mean of the terrain on a line along the way at
gometres outward, with a tent weightover
gometres to each side (5 samples).gois the existing metres where the cones start to let go, so thisadds no rule value. The mean makes a wall follow the hillside, not each bump of it 10 m up the slope.
linear interpolation of its two end needs. The existing no-room fit (
fit), now of ONE need, gives the slope andthe wall at that foot. The piece's cone from that foot is the existing exact cone (
edge_cone) with that slope andthat wall.
fitis continuous in the need, so the slope, the wall, the 4.5 m cap and the steeper face past it allchange continuously along the rim. Two pieces that share a vertex give the same need, slope and wall there,
whatever their lengths.
the slope side is clamp(T_rim, h, h + wall) for a cut wall (the fill side alike). So the visible top is the lower
of the wall's profile and the terrain at the rim. Both are continuous along the rim, so the top is continuous. Where
the terrain at the rim reaches the paved edge, the wall goes to 0 at the terrain's own grade along the rim; where
the need falls below what the steepest face takes, the wall goes to 0 at the need's grade (smooth, because of the
mean). No piece reads another piece, and no ground stands above the top of the wall: the face above the wall starts
at the top of the wall.
Cell independence (by construction)
Every input of a vertex's values is a value at a global point that two cells hold bit-equal: the vertex (a ring's
own vertex or a bin-grid cut, global), the paved field there (
paved_endthrough the window's bins, as today), thehost line's samples and mitres (the same words that give the paved field there), and the terrain at points derived
from these. Nothing reads along the outline: a piece reads its own two ends. So two cells that hold a piece give it
the same values, and two pieces that share a vertex agree there.
Along the piece and across the slope band
fitat the interpolated need(exact for a need that is linear along the piece, also where the fit changes regime inside the piece).
release), andthe band fades into the terrain at its outer edge (
band_fade_m).The cases
corner, as today.
round a cap. A level-change end (square band end at a structure) is GP12.2b's.
existing soft maximum and minimum of the groups join them, as today.
need; with no known end, the class slope and no wall (as today's
most).Records and cost
tholds the new vertex terrain; theterrain grade outward (toe width) is read along the frame's direction at the piece's middle, so the stub has the
grade of its neighbours too.
instead of 3 fits of two needs, and 3 interpolations. About the same work; no new fetches.
instead of 1, each once per end point (cached).
The splits
SPLIT_NEED_M(0.5 m) goes: the fit at the interpolated need is exact for a linear need, so the need no longerneeds short pieces.
SPLIT_GROUND_M(0.25 m) stays, on the new mean terrain: a linear need needs a ground that is linear along thepiece. The mean is smoother, so it splits less. I check it with the half-bin cut-shift test, and I remove it if the
test does not need it.
SPLIT_M(the paved field linear along the piece) and the bin cuts stay.Checks
check::wall_stepsfrom the attempt (gate at the measured count, at most 13) and a second gate of the same kind,check::slope_steps: the change of the ground's grade along the rim across a piece end between two pieces of onestraight rim, at 1, 2 and 4 m out (the bands). The half-bin shift test; the border and records checks; the heights
gates; Rust = WGSL.
Size: about 150 lines in the crate and 25 in WGSL, plus the two checks. No record format change, no new rule value.
One deviation from the issue: no
wall_tapervalue. Rule 3 gives the taper by construction (the need's mean and theterrain at the rim); I add the value only if the pictures show a cut end that the rule does not remove.
Generated by Claude Code
timohueser commentedon Nov 11, 2026
GP12.2a: amendment to the design note, and the deviations (PR #3379)
Amendment, after the half-bin shift test. The vertex values alone left the ground cut-dependent: the half-bin shift moved it by up to 1.85 m. Cause: at a cut, the round cone of the vertex beat the neighbour edge's ruled surface wherever the slope changes along the rim (the cone of a gentler point reaches over a steeper stretch). So:
ON_A/ON_B): 32 → 36 B per edge.MAGIC0x4f425213.Result: shift worst 0.239 m, 995 points over 0.1 m (base 0.41 m, 5,706).
Deviations.
wall_tapervalue: the visible top is the lower of the wall profile and the terrain at the rim by construction.wall_steps40 → 17, not at most 13.For #3352 (GP12.2b): the end faces take this top. An outline edge now has 9 words and the
ON_A/ON_Bflags; a level-change end is a corner (it keeps its round cone), as before.Generated by Claude Code
timohueser commentedon Nov 13, 2026
Done: merged into
ground-planas #3379 (the slope and the wall are values of the rim's vertices).Generated by Claude Code