Repository navigation
TrailView parts P6: the pair of tubes, the opening in rock and the free tube end - #3780
timohueser wants to merge 20 commits into
Conversation
… its record the heading of its frame line A pair is one part of two chains, so the bake pairs two openings only where each chain has a part at both of its ends. The record of a pair takes the heading of the opening farther in, square to the frame line that holds both openings, as its mate's metres are. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… free tube end, and a closed free end - A pair has an end at its mate's opening too. Each opening draws the head wall of both with its own hole, on its side of the middle between the two tubes' walls; along the chains, the inside and the shell of each tube end at that middle where the other tube is near, and faces close the steps where the floors, rooms or shells differ. - Rock and free ends: a rim hugs the opening (no head wall, no wings), in the end's look; a free end's shell runs its collar from it. - A free end covered at its opening has no opening: its tube ends in a dark face, with no box in front and no daylight. - All five kinds are built. The ground plan opens and widens the approach of a pair's mate too. - The mesh keeps only the vertices that a face uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dle between their walls, with no gap A tube finds the other by its cells, not by the record of its pair, so a tube in a tile with no record of its pair ends at the middle too. A station a metre past a chord still meets it, as the two openings of a pair lie on their frame line within the rounding of the record. Where one ring of a chord meets the other tube, the plane runs along the chord. Each tube runs 5 cm past the middle, as its vertices are rounded to world units. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r opening that leads the same way Not only the head of a pair: two built ends that are no pair, whose axes pass within reach of a head, and that lead the same way within pair_max_m and pair_max_deg at one level, end their heads at the middle between their walls. So two underpasses, two arches or a free end beside an arch side by side do not stand in each other's openings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e on each side, not only the nearest A tube between two others ends at the middle on each side, and so does a head with a near opening on each side: the mate of a pair on its side, else the nearest one that leads the same way. The mesh builder clips by several planes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ading is square to its frame line Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tep takes max and min, not clamp `f64::clamp` checks its bounds and so brings the formatting of floats into the WASM (about 24 kB raw). A clip's map of cut vertices and the tubes' cells take key and value types that the crate's maps already have. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d the cut of tubes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
…anch Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
timohueser
left a comment
There was a problem hiding this comment.
Review of 2908211
Result: 2 blockers, 4 should-fix, 3 nits. The pair of two parallel tubes on one frame line is correct. The general
rules "two tubes meet at the middle" and "a head ends at a near opening" fail where the two parts do not start on one
line. I proved the faults with throwaway tests on the crate (rays from the room). The full review with numbers is on
the owner's PC: parts/p6/REVIEW-3780.md.
Blockers
- A cut runs on over the whole chord (
tube.rsNet::clips, 382-408). Where one station of a piece meets the
other tube and the next station does not, the clip plane goes parallel to the own chord over the full piece. The
tube then has no wall on that side, and a slot in its vault, where the other tube is not there.- Staggered openings: A from 0 m, B 7 m to the side from 3 m. From A at 0.5, 1.5 and 2.5 m in, a ray to the side
meets no face within 30 m. A rider sees out of the tube, and the sky shows through the roof. This is very likely
the sky slot atnear-box. - A tube that ends or turns away inside a chord: A has no wall on that side for the rest of the chord.
- Fix: clip only between two stations that both meet the other tube. Split the piece where the other tube starts
or ends.
- Staggered openings: A from 0 m, B 7 m to the side from 3 m. From A at 0.5, 1.5 and 2.5 m in, a ray to the side
- A head cut leaves the wall open (
arch.rshead_cutsand the clip, 121-262). Only the reveal step gets a
closing face, and only on one frame line. The wall's own section at the cut stays open where the two heads differ.- Two arches on one line, one wall 2 m taller: a ray inside the taller wall goes 11 m to a back face.
- Two arches with frame lines 3 m apart: both walls are open at the middle.
- You can see this in
free-open-eye(the arch wall over the rim). - Fix: close the section in the cut plane, as
tube::shelldoes withcut_faceandsteps. Cut a head only where
the other part crosses its frame line, not for each opening within 40 m.
Should-fix
- The mate end takes the pair's collar (the larger of the two tubes). The ring of the covered tube then takes
10 m of hill: the ground look changes and the trees go. This is the pale patch inpair-mway-top(record: collar
10). Fix: write the collar of each tube in the record. - Tubes and heads meet by two different tests. The tube cut has no heading limit, and at an angle its middle is
off by more than the 5 cm overlap (0.23 m at 25°). Both tests ignore chains that are not built. The 12 former pairs
are now an arch beside a tube of the old code, with no cut between them. Please show 2 or 3 of them. - Cost.
Net::newfinds the tube of each chord with a loop that repeats until nothing changes. For a chain of n
chords this is quadratic:mouths()takes 66 µs, 302 µs and 2.32 ms for 100, 300 and 900 chords (develop
built_ends(): 16, 47, 161 µs). It runs per node, per tile and per ground-plan cell. Onlymeshesneeds it. Fix:
one walk (BFS or union-find), only inmeshes.meshes()of two 300-chord tubes that meet: 19.3 ms against
13.9 ms on develop. - The cap and the foot of a pair come from the record's tube only. Over the lower tube the wall can pass the cap
by the floor difference (pair-step: 2.5 m). The foot does not read the mate's collar ground.
Nits
mesh.rs132: "one of at most four" clips. There are at most two.ladder.rswholesearches all openings per tube. Make the (tube, end) map one time and use it forwholeand
spans.- A head cut reaches 40 m along. That can be past the 40 m tile buffer, so two tiles can decide differently.
The three points in the pictures
- pair-rail-eye. The top is flat at
face10.62 m: the ground on the frame line is that high. The slanted sides
are the wings: they fall 2:1 to the coping in 5 m (the P4 rule for a short row). The rule is correct and the wall is
under the cap. The wall is heavier than P5 (2:1 wings, 3.6 m over the shell), but this is the known P5 case "a wall
on a sloped line stands high", not a P6 fault. The owner must decide on it. - pair-mway-top. This is the ground ring of the covered tube (item 3). It is not a shell and not a fade tail.
Fault of this PR. - free-open-top. This is the shell. Its width and foot are correct. The ragged line is where the ground crosses
the shell, so it is the ground's. The only fault of the PR there is item 2.
Not checked
I did no render, no bake and no browser suite. I tested only obc-trailview-parts (16 pass, my probes included).
🤖 Generated with Claude Code
…ube crosses the frame line A clip holds between two stations that both meet the other tube; where the other starts or ends inside a piece, the clip ends there and a face closes the shell. One test (`Net::meets`) serves tubes and heads, with the middle measured square to each tube's chord, so both find one plane at any angle. A cut head closes its section. The tube labels come from one union-find walk, made only for the meshes. Each tube of a pair takes its own collar (`mate_collar`). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…oot over both tubes The record of a pair writes `mate_collar`; the device stops the ground plan's stamps of each way at its own tube's collar. The face of a pair holds its band over the higher crown and its cap over the lower; the foot reads both collars and both floors. One map of the opening at each tube end serves `whole` and `spans`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… pair read both tubes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e frame line Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d min, not clamp `clamp` with variable bounds brings the formatting of floats into the WASM. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Where a narrow tube lies in a wide one's room, the middle between their walls lies past the narrow one's axis: the clip took off the wide tube's own room. It now takes off the side toward the other tube's axis. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d ends at an approach and over the heights it spans `Net::meets` reads where the other tube runs from the planes of its rings (at an opening its frame line, at a bend its mitre), not from its chord's vertices: the two openings of a pair lie on one frame line, and their chord vertices up to half a metre off it. A head also ends where the approach of an opening behind its frame line crosses it (within `pair_max_m`), so it keeps out of the way to that opening, and it meets a tube whose room overlaps its wall from its foot to its top, so a pair whose floors lie far apart still ends at the middle. `Meet` holds how a part looks for other tubes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…and a head's closed cut Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fix round for the review of 2908211Head: 3ac162b. Box B is baked again (features r36, the bake of dd67223, sha 2e777e0d). The pictures are of B1. A cut holds only where both tubes are (
B2. A head ends only where another tube crosses its frame line, and its cut is closed (
S1. Each tube of a pair has its own collar ( S2. One test for tubes and heads ( S3. The tube labels: one walk (
S4. The cap and the foot of a pair read both tubes ( N1. The comment says one clip per side and four planes per key; a debug assertion holds it. N2. One map of the Checks. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
timohueser
left a comment
There was a problem hiding this comment.
Delta review: 2908211..e9e4f30
The full review is in DELTA-3780.md next to REVIEW-3780.md on the owner's PC. I proved each finding with throwaway ray probes in obc-trailview-parts (not committed). obc test -p obc-trailview-parts passes at head (12).
Verdict: 1 blocker, 2 should-fix, 5 nits. I recommend one rule in the bake instead of patches on the device (see the end).
Blocker
- D1. A head cut where its own tube is not cut leaves the shell open at the front (
arch.rs:121-131,tube.rs:441). Rule (c) cuts the head where the approach of an opening behind it crosses the frame line. The own tube is not cut there, so its wall and vault past the middle stand on behind the head, and no face closes their section at the frame line. Probe, B 3 m behind A: a ray west from inside A's wall meets nothing. With B 20 m behind, a ray from in front into A's wall meets nothing within 30 m. This matches the specks of sky atstagger-box-near, and very likely the front of the post atfree-openand of the pier atstagger-rail.
Should-fix
- D2. B1 still misses overlaps that start and end between two stations (
tube.rs:485-525). A 6 m tube inside one 10 m chord of A: A's shell stands 2 m into its room. Two tubes in a row beside A with a 3 m gap: in the gap, A has no wall and no vault (rays north and up meet nothing). - D3. The approach is the first chord, straight for 40 m, at any heading. A tube 22 m away at 45 degrees cuts A's wing, where its real way may never pass.
Nits
- D4.
end_sectionlies on the bound only if the station is square to the chord. T-junctions are possible. - D5.
meets/clipsgive no cuts withoutmeeting(). A debug assertion would catch that. - D6. The spec's pair
faceline does not say which bound wins (the code keeps the band). The line is not wrapped. - D7. The head's level test reaches down to the foot, so a tube under a portal at an angle can cut the head.
Sound
mate_collar agrees in the spec, the bake, the device and parts.ts. The cap and foot over both tubes are right. The union-find is right, and only meshes calls meeting(). The closing faces of two heads on one line face the right way. The clip side for a narrow tube in a wide room is right. Rule (a) is right for a pair.
free-open, and one rule for all three owner notes
There is no rule on the device alone. A post (or pier) and an open side are the two answers to the same shape: one room beside the other's open approach. The rule belongs in the bake: where the rooms of two tubes overlap, they are one room.
- Absorb: a tube whose axis lies in a wider tube's room for more than half its length has no part. The wider tube widens, and the way runs in it (stagger-path). This replaces today's same-tube test at one opening.
- Join: if the rooms overlap at an opening, the two openings are a pair, for any kinds, on the frame line of the opening farther in (free-open, stagger-rail, stagger-box: one head, no post, no pier).
- Meet and part in the hill: the bake puts a vertex where an overlap begins and ends. The device cuts only pieces whose two rings meet.
This fixes D1 to D3. The halving, the bound plane and the approach leave the device: about 75 lines fewer on the device and about 80 more in the bake. Pairs that work now do not change. I did not implement or bake it.
Public docs: not reviewed for change; the spec rows match the code.
Summary
P6 of the TrailView tunnel parts (#3651, #3683): with
ground=plan, the viewer draws the pair of tubes, the openingin the rock and the free tube end.
Pair,RockandFreejoinBUILTofobc-trailview-parts, so every chainwhose two ends have a part draws as parts. Without
ground=plan, nothing changes.The design answers of #3683 are in the issue (issuecomment-7067727023): a free end is cut square with a rim; a pair
has no middle wall where its shells overlap (the owner's option 1, made general); the ragged edge at a free shell is
the ground's.
tube.rs,arch.rs): a pair has an end at its mate's opening too (Net::new). Each opening drawsthe head wall of both, with its own hole, up to the plane in the middle between the walls of the two tubes. Where
both holes reach that plane, they are one opening whose outline follows both arches; the reveal closes the step
where the two holes differ there.
tube.rs,mesh.rs): where the shells of two built tubes overlap, the inside and the shell ofeach end at the middle between their walls, and faces close the steps where their floors, rooms or shells differ.
One test,
Net::meets, finds the other tube: by cells of the tile, where its chord crosses the station's linebetween the planes of its rings (at an opening its frame line, at a bend its mitre), at the level of the room. The
middle is measured square to each tube's own chord, so both tubes find one plane at any angle. A clip holds only
between two stations that both meet the other tube; where the other starts or ends inside a piece, halvings find the
place, the clip ends there (a bound plane) and a face closes the shell's section. A clip takes off the side toward
the other's axis, also where a narrow tube lies in a wide one's room. Each tube runs 5 cm past the middle, as its
vertices are rounded to world units. The tube labels come from one union-find walk, made only for the meshes.
arch.rs): the head of a built end ends at the middle where another built tube crossesits frame line, or the approach of an opening behind it does (within
pair_max_m), and that tube's room overlaps thehead from its foot to its top. A face closes the head's section there: from the foot to the top, but the hole from
the front to the frame line and the room from there to the back.
arch.rs):rockandfreehave no head wall and no wings. A rim, the frame grown by the shell(0.95 m round the room), hugs the opening from the foot up, with the reveal and the frame of the arch. A free end's
shell runs its collar from it.
arch.rs,boxes.rs,tube.rs): a free end covered at its opening (collar0, meets no way)has no opening: a dark face closes its tube on the frame line; it has no box in front, no ring and no daylight.
openings.rs): the crate'smouthsgives each opening of a built end, two of a pair, so theapproach of a pair's mate widens to its jamb lines too.
ladder.rs,mod.rs,parts.ts): a pair needs a part at both ends of both its chains (12 pairs ofrevision 35 had a chain with an end of no part, which never draws as parts); a pair's record takes the heading of the
opening farther in, square to its frame line, along which its
mateis measured. Each tube of a pair has its owncollar (
mate_collar), so its ring, shell, boxes and ground stamps end where its own hill starts. The face of a pairholds its band over the higher crown of the two tubes and its cap over the lower; its foot reads both collars and
both floors.
obc-data-steps), the spec (rung 5,heading,collar,face,footandmate_collar), the recorded sizes of the parts and plan bridges (wasm_size_guard.py).it meets the front of a face), with one opening where their holes overlap and a head wall between them where not;
with floors 0.8 m apart; the boxes hold the room. A rim hugs its opening; rock, free and a closed end are closed
but at their foot; a closed end has no box in front and no daylight. Two tubes meet only where both are: staggered
openings, a tube that turns away inside a chord, a narrow tube in a wide one's room, a pair 25 degrees apart; a cut
head is closed (a taller wall, frame lines 3 m apart). The bake: a pair whose second chain forks in the hill is no
pair; each tube of a pair has its own collar.
Deviations from #3683
ends of both chains;
headingof a pair; each tube of a pair has its owncollar, withmate_collar; thefaceand
footof a pair read both tubes), and the bake changes (revision 36).and a head ends at another tube or at the approach of an opening behind it. This also changes develop's arches and
underpasses where two of them stand side by side.
Pictures
On the owner's PC:
/media/timo/OSM1/tmp/ground-plan/parts/p6/pics/(INDEX.mdwith a caption per place andcamera;
sheets/with today's app | new roads (develop) | new roads with the parts;boxb/full size;fix/withthe parts before | after the fix round of the review;
slider.html). Box B, 13 places of the three kinds, 4 places ofdevelop's parts, and 9 places of the fix round (staggered and angled neighbours, former pairs), from the road 25 m and
4 m out, from above and from inside. Develop is 1f7b5f5 with features r35; the parts column is 156e769 with
features r36b (the bake of dd67223; the last commit changes only the recorded bridge size).
room where the tubes overlap, with no fin and no wall of one tube in the other; a cut head is closed; a tube keeps
its wall where the other is not yet there (
stagger-rail-inside: a pier between two staggered openings); the rimof the openings in rock and of the free ends; a closed free end is dark from inside (today's app and develop show the
hill through it: BROKEN there); the arch and the underpass of P5 do not change. At
pair-mwaythe trees behind theleft part of the head wall come back.
free-opena thin post stands in the one opening of a free end and an arch: the free end lies 1.4 min front and their rooms overlap 3.7 m, and the free tube keeps its wall until the arch's tube starts (the review's
rule for staggered openings). At
pair-stepa 2.5 m face closes the step between two track beds (data). Atpair-mwaya smaller pale shape stays behind the head wall (not the collar any more; source not found). Atstagger-patha path tube lies in the road tube's room (data), so only part of its rim stands. Atstagger-boxspecks of sky at the foot of a cut head. At
was-pair-1a grey-blue area beside the arch's opening, the same beforethe fix round. At
near-boxa slot of sky between two underpasses' head walls, as on develop (their shells do notmeet). At
pair-thina dark wedge of ground in front of the pier. The dark blocks atfree-cliffare a gallery's.stagger-pathhad no road tube (sky through it).Measurements
Develop 1f7b5f5 against this branch (bd57096 for the frame time, the first render, the cold starts, the bake and
the bridges; the pictures are of 6276fec, whose faces are the same), timosPC, GTX 1660 SUPER, beside the terrain
run and other agents (load 11 to 14): relative numbers.
ground=plan(GPU ms per frame, 3 alternated rounds)ground=planground=plan(median of 12 loads, 4 alternated rounds)ground=planmouths(), developbuilt_ends()), one tube of 100 / 300 / 900 chords, native release, median of 41, 3 alternated roundsmeshes()of two tubes of 300 chords, 7 m apart (they meet) / 30 m apartand structure pool (24 MB). The fixture holds one underpass and no end of the new kinds.
6.6 s to 8.5 s); the noise of the PC is larger than the change.
place, the bridge's time per load (bd57096, before the fix round): pair-mway 536 → 743 ms, pair-track 1,018 →
1,532 ms, free-cliff 551 → 753 ms, walk 56 → 91 ms. It runs in the stamp worker; the time until the parts are right
does not change. The fix round makes the net of a cell linear again (it was 2.3 ms at 900 chords) and keeps the cut
at about +55 % where two tubes meet; I did not measure the cold starts again.
clampwith variable boundsbrings the formatting of floats into the WASM (+24 kB), so the parts use
maxandmin. The ground plan bridge grows by about 2 kB, as its openings now go through the parts' net.The measure reads 233 openings again (55 on develop), as all built stretches open. Ends: 130 pair openings (154 on
develop: 12 pairs became arches; box B's tiles hold 9 of them), 327 arch (303), 191 free, 49 rock, 504 box. The fix
round changes only pair records: all 55 gain
mate_collar, 15 changecollar, 21face, 10foot.Checks
Run:
obc test -p obc-trailview-parts(12),-p obc-trailview-features(133),-p obc-ground-plan(165, before the lastchange to
Net::meets, which the ground plan does not call),-p obc-data-steps(80, first round)cargo clippy --all-targets -D warningsforobc-trailview-parts, its bridge,obc-trailview-featuresandobc-ground-plan; wasm32 forobc-trailview-parts-bridgeandobc-ground-plan-bridgecargo fmt --all --checkwasm_size_guard.py --module partsand--module ground-plan; the records are the CI sizes of 3ac162bbuilder/ground-plan-wasm/check-bytes.sh: 256 of 256 cells give the native digesta way into the opening meets no face): against 2908211, the fix round fixes one place (
stagger-path) and changesno other
structures/parts(the change ofparts.ts)npm run check,obc prose --check,obc suites checkLeft out:
npm run check:wgsland the phone run (no shader or viewer change), the browser suites and the rest of theweb vitest (CI),
obc test affected(CI), the cold starts and the frame time again (no change of the viewer).Public docs: no change.
Requirements: none
🤖 Generated with Claude Code