Skip to content

TrailView ground plan GP12.6: the far forms of bridges and portals; the pages paint storey 0 only #3347

Open

Description

@timohueser

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, and #3273 (the far look as strokes: the far block, stroke pages of level 17 and 16). Design on
timosPC: /media/timo/OSM1/tmp/ground-plan/crossings/CASES.md 7.5 and 7.6, drawings/c5-viaduct.svg panels B to D.
Short names: gp/ = host/obc-ground-plan/src/, tv/ = builder/web/src/lib/trailview/. Code places verified on
ground-plan ea4da43.

Goal

From far away a bridge is the same deck with fewer parts, and a tunnel mouth is a dark plate in its frame. The far
ground never paints a bridge or a tunnel floor onto the terrain. One model draws a structure at every distance: the
old bridge and tunnel meshes stop on the plan path.

Depends on / blocks

Design

1. The page rule: storey 0 only

2. The far forms (CASES 7.5)

  • Data. The far block gains a part of storey lines: per DECK piece its line (samples, half-width, the edge band,
    the depth, the edge feature's height), per pier point its position, and per portal line its position, direction
    and opening. Estimate: about 40 bytes per 10 m of deck at the far block's sample spacing, 32 bytes per portal.
    Report the far block's bytes per cell before and after.
  • Build. The crate builds the far forms' triangles in the far build of a cell (records::far_block,
    cell::far_request; and in a full build with its far block), from the same states, sheets and lines as the near
    build, as a small mesh beside the far block. One model: the near sheet and the far form come from one source.
  • Forms:
Thing Distance Form Thickness
Deck the mesh range to about 2 km a box per stretch: top, two edge faces as tall as deck plus parapet, underside the edge band and the deck depth: never a single sheet
Deck past about 2 km, while wider than a pixel a ribbon: top and two edge faces the edge faces keep the depth
Pier to about 2 km a plate of the pier's width, as tall as the pier closed (two faces and the ends)
Portal to about 2 km one dark plate in the frame's outline the frame's depth
Portal past about 2 km nothing: the way ends at the hill

A deck shorter than 10 m has no far form: past the mesh range the page shows the way over the water (CASES case 1).

  • Draw. The far forms draw with the structure pipeline and its casters, and the structure pipeline discards a far
    form's fragment where plan_meshed holds (the predicate of GP12.3b: there the cell's mesh draws, and its sheets
    draw). Nothing fades: the mesh hands over by cells. A near sheet and its far form never draw at one place, and no
    structure is missing between them.
  • The ground under a far deck. The stamp's trough is off on the plan path at levels 16 to 18 (GP12.2b); this step
    turns it off at the far levels too (nodeStamps, tv/terrain/bins.ts:1048, levels under NEAR). Where the terrain
    stands over a far deck's underside (a deck in a cut, on a slope), a page holds it under the deck by GP12.2b's
    ceiling, from the far block's deck lines. Count such places on box B first; if there are none in the gallery's far
    views, write the count down and leave the ceiling out of the pages.

3. What stops on the plan path

  • structureMeshes (tv/structures/node.ts) does not call bridges() and tunnels() with the plan; the interim
    hand-over of GP12.3b and GP12.4 (the discard of the old meshes where plan_meshed holds) goes. The portal holes are off since GP12.4.
  • The stamps layer (planner/trailview-stamps, tv/terrain/stamp-bake.ts) bakes the owner nodes' structure meshes
    with the plan: it then holds no bridge and no tunnel mesh. Its bytes shrink; rebake it locally for the shots
    (obc data update local) and report its bytes before and after.
  • The eye's floor on a deck or in a bore (floorsOf, tv/structures/node.ts; Structures.floor) reads the lines,
    not the meshes: it stays.
  • The default path keeps bridges.ts, tunnels.ts and roads/decks.ts until GP19 (TrailView ground plan GP19: the ground plan becomes the only path, the old code goes, docs, budgets, merge into develop #3110).

Invariants

  1. One model at every distance: on the plan path no structure has two meshes at one place, and none is missing at the
    mesh range. Check: three views of one bridge and one portal from before, inside and past the line of the meshed cells.
  2. No page paints a DECK or HIDDEN stretch; every OPEN stretch is painted. Check: a crate test over the fixture's far
    blocks.
  3. The far forms keep their edge faces and depth: no single-sided sheet shows an edge at any distance. Check: a test
    of the far mesh's closure, and the far gallery views.
  4. A far form comes from the same states as the near sheet: a crossing on step 3 has no far deck. Check: crate test.
  5. The default path does not change.

Decisions already made by the owner that apply

Not in scope

Roofs far (GP12.7). The stroke renderer itself (#3273). Far water under decks (#3107).

Proofs and pictures required before review

  • Add far cameras to the gallery (gallery/views.json): one per viaduct and per mouth, at about 600 m, 1.2 km and
    2.5 km: B01, B14, p08, R09, T15, T02, B1, T07. Shoot them before and after with the near cameras of
    all 50 places; one before | after sheet per place; a verdict table. The implementer opens every sheet.
  • Expected: B01, p08, B14 whole at every distance with no grey band; the far T02 and B1 with a dark opening,
    no ground in it; no bridge missing and no doubled deck at the line of the meshed cells.
  • The hand-over views of invariant 1 at B01 and at the fixture's bridge-top place.
  • The owner sees the sheets and gives his OK before the merge.

Cost to measure

Base: ground-plan at the branch point; develop's head for the frame.

  • Far forms: triangles per km of deck and per portal (CASES 7.6 estimate: 6 to 8 per 20 to 40 m of deck, 2 per
    portal), against today's far bridges.ts and tunnels.ts meshes of the same structures.
  • The far block's bytes per cell; the far build's time per cell (cell::far_request), p50 and p95.
  • The stamps layer's bytes (it loses the structure meshes).
  • Frame: zoom-out of flights.json, walk, valley-drive, and luz, against the base and develop's head.
  • WASM bytes, gzip and raw (the block's 15 to 25 kB; report the step's share; stop past 25 kB in total).

Risks and the stop rule

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

  1. timohueser commented on Nov 13, 2026

    @timohueser
    OwnerAuthor

    From GP12.3b part A (PR #3470), for GP12.6

    The levels of the way graph (graph::levels) now run in the feature bake (features revision 18), on every zoom-16 cell of each zoom-13 tile with a road way. The zoom-13 tiles carry per road way the tags levels (the states D/B/O/H and the end lines A/P/C, in metres along the stroke), storey and slab (specs/trailview-features.md, Structures). The device reads them with graph::level_tags::read; it does not run graph::levels. The bake uses the rule tables of its own build: a change of a level rule (cover, lift_max_m, open_max_m, the least rooms, the class rows) or of the code of the levels takes a new bake, a new revision and a fixture rebake (make-fixture.py features, about 10 s); the test the_tiles_carry_the_levels_of_each_cell fails until then. A way of a cell margin reads the levels of the cell that owns it, so cells agree by construction. The low zooms carry no level tags.

    For this step: a far form that needs the states reads the zoom-13 tags; the far tiles hold none.


    Generated by Claude Code

  2. timohueser commented on Nov 14, 2026

    @timohueser
    OwnerAuthor

    GP12.3b part B (#3482) builds the interim mechanism that this step ends:

    • structures/bridges.ts builds a bridge's faces into their own index range (MeshBuilder.bridge,
      StructureMesh.decks). With the ground plan they draw with their own pipeline (BRIDGES of structures.wgsl),
      which discards each pixel where a cell's mesh draws, by the same dither as a cut piece's fade (plan_share of
      plan/cells.wgsl); the casters discard there too (bridge_caster). The structures bind the plan cells at their own
      binding by an include swap (plan/cells-buffer.wgsl, structures/plan-cells.wgsl).
    • A covered bridge's walls and roof stay outside that range (MeshBuilder.beside).
    • The features layer is at revision 19 (crossing A lines of one deck group become one line).

    Generated by Claude Code

  3. timohueser commented on Nov 14, 2026

    @timohueser
    OwnerAuthor

    A note from the fix round of GP12.3b part B (#3482) for the far forms.

    Near the eye, each deck now shows what it is made of, by the rule of the old bridges (segment of
    structures/bridges.ts), per deck way: a road on beams and a railway are concrete, a bridge that hangs is steel, any
    other is dark timber; a railing is light wood on timber, else steel; a timber deck's top that the old viewer did not
    count as paved is of planks. The device writes this into each storey line's finish word (bits 21 to 23 from
    records::BUILD_SHIFT; the material field is now 4 bits). A far form can read the same bits, so that a bridge keeps
    its material from near to far.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions