Skip to content

Commit 558d16c

Browse files
fix(showcase): rebuild the wheelbarrow so the tray and wheel joints actually meet
Walls sat on the floor and spokes were audited against floor slats. Seated walls, nested handles, and a hub-local spoke metric lock the joints. Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent fbcaab2 commit 558d16c

7 files changed

Lines changed: 1727 additions & 392 deletions

File tree

15.5 KB
Loading

docs/gallery/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@ <h2><a href="park-bench/">park-bench</a></h2>
10241024
<div class="card-body">
10251025
<h2><a href="wheelbarrow/">wheelbarrow</a></h2>
10261026
<p class="teaches">A procedural wooden wheelbarrow through UVs, bake, LOD, collider, and Unity glTF, asserting recomputed budgets rather than an API contract.</p>
1027-
<p class="witnesses"><span class="tag">witnesses</span> Recomputed: 3088 tris, two materials with 308 metal faces, UVs in 0..1 with zero AABB overlap, outer AABB 1.418×0.463×0.594 m, LOD ratios in band (5.2 COLLAPSE more aggressive on LOD2), convex collider 106 tris, non-empty glTF. --skip-decimate exits 9 on the LOD1 ratio budget.</p>
1027+
<p class="witnesses"><span class="tag">witnesses</span> Recomputed: 2500 tris, two materials with 1094 wood and 190 metal faces, UVs in 0..1 with zero AABB overlap, outer AABB 1.556×0.630×0.572 m, zmin 0, hygiene 0, wall-floor seat 12 mm, spoke clearance 40 mm, LOD ratios in band (5.2 COLLAPSE leaner on LOD2), convex collider 90 tris, non-empty glTF. --skip-decimate exits 9 on LOD1; --stray-vert exits 15 on hygiene; --lift-z / --short-legs exit 16 on grounded; --fat-spokes / --float-walls exit 17 on joint fit; --pipe-rim exits 18 on tread aspect.</p>
10281028
<a class="card-link" href="wheelbarrow/">View example <span aria-hidden="true">&rarr;</span></a>
10291029
</div>
10301030
</article>
@@ -1068,7 +1068,7 @@ <h2><a href="hitching-post/">hitching-post</a></h2>
10681068
<div class="card-body">
10691069
<h2><a href="grindstone/">grindstone</a></h2>
10701070
<p class="teaches">A procedural grindstone on a timber trestle through UVs, bake, LOD, collider, and Unity glTF, asserting recomputed budgets rather than an API contract.</p>
1071-
<p class="witnesses"><span class="tag">witnesses</span> Recomputed: 1604 tris, three materials with 80 metal and 26 stone faces, UVs in 0..1 with zero AABB overlap, outer AABB 0.630×0.615×0.575 m, LOD ratios in band, convex collider 130 tris, non-empty glTF. --skip-decimate exits 9 on the LOD1 ratio budget.</p>
1071+
<p class="witnesses"><span class="tag">witnesses</span> Recomputed: 928 tris, three materials with 216 wood / 160 stone / 180 metal faces, UVs in 0..1 with zero AABB overlap, outer AABB 0.710×0.419×0.610 m, zmin 0, hygiene 0, four shoes planted, trough seated in the sills, stone dip 26 mm, LOD ratios in band (5.2 COLLAPSE leaner on LOD2), convex collider 198 tris, non-empty glTF. --skip-decimate exits 9 on LOD1; --stray-vert exits 15 on hygiene; --lift-z / --short-legs exit 16 on grounded; --float-crank / --float-legs exit 17 on joint fit; --no-dip / --narrow-trough exit 18 on seat.</p>
10721072
<a class="card-link" href="grindstone/">View example <span aria-hidden="true">&rarr;</span></a>
10731073
</div>
10741074
</article>

docs/gallery/wheelbarrow/index.html

Lines changed: 836 additions & 189 deletions
Large diffs are not rendered by default.

showcase/gallery.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
"name": "wheelbarrow",
154154
"dir": "showcase/wheelbarrow",
155155
"teaches": "A procedural wooden wheelbarrow through UVs, bake, LOD, collider, and Unity glTF, asserting recomputed budgets rather than an API contract.",
156-
"witnessesFix": "Recomputed: 3088 tris, two materials with 308 metal faces, UVs in 0..1 with zero AABB overlap, outer AABB 1.418×0.463×0.594 m, LOD ratios in band (5.2 COLLAPSE more aggressive on LOD2), convex collider 106 tris, non-empty glTF. --skip-decimate exits 9 on the LOD1 ratio budget.",
156+
"witnessesFix": "Recomputed: 2500 tris, two materials with 1094 wood and 190 metal faces, UVs in 0..1 with zero AABB overlap, outer AABB 1.556×0.630×0.572 m, zmin 0, hygiene 0, wall-floor seat 12 mm, spoke clearance 40 mm, LOD ratios in band (5.2 COLLAPSE leaner on LOD2), convex collider 90 tris, non-empty glTF. --skip-decimate exits 9 on LOD1; --stray-vert exits 15 on hygiene; --lift-z / --short-legs exit 16 on grounded; --fat-spokes / --float-walls exit 17 on joint fit; --pipe-rim exits 18 on tread aspect.",
157157
"hero": "docs/gallery/assets/wheelbarrow-hero.webp",
158158
"preview": "showcase/wheelbarrow/preview.webp",
159159
"tags": [
@@ -201,7 +201,7 @@
201201
"name": "grindstone",
202202
"dir": "showcase/grindstone",
203203
"teaches": "A procedural grindstone on a timber trestle through UVs, bake, LOD, collider, and Unity glTF, asserting recomputed budgets rather than an API contract.",
204-
"witnessesFix": "Recomputed: 1604 tris, three materials with 80 metal and 26 stone faces, UVs in 0..1 with zero AABB overlap, outer AABB 0.630×0.615×0.575 m, LOD ratios in band, convex collider 130 tris, non-empty glTF. --skip-decimate exits 9 on the LOD1 ratio budget.",
204+
"witnessesFix": "Recomputed: 928 tris, three materials with 216 wood / 160 stone / 180 metal faces, UVs in 0..1 with zero AABB overlap, outer AABB 0.710×0.419×0.610 m, zmin 0, hygiene 0, four shoes planted, trough seated in the sills, stone dip 26 mm, LOD ratios in band (5.2 COLLAPSE leaner on LOD2), convex collider 198 tris, non-empty glTF. --skip-decimate exits 9 on LOD1; --stray-vert exits 15 on hygiene; --lift-z / --short-legs exit 16 on grounded; --float-crank / --float-legs exit 17 on joint fit; --no-dip / --narrow-trough exit 18 on seat.",
205205
"hero": "docs/gallery/assets/grindstone-hero.webp",
206206
"preview": "showcase/grindstone/preview.webp",
207207
"tags": [

showcase/wheelbarrow/README.md

Lines changed: 73 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
# Wheelbarrow
22

3-
A showcase piece, not an example. Procedural wooden wheelbarrow (staved
4-
U-tray, iron straps, single spoked wheel, rear legs, handles) then the
3+
A showcase piece, not an example. Procedural wooden wheelbarrow (two
4+
chassis shafts that are the handles, box tray with overlapping floor
5+
slats, iron straps, single flat-tread spoked wheel, rear legs) then the
56
shipped pipeline: unique-cell UVs, Cycles high-to-low normal bake, LOD
67
chain, convex collider, Unity glTF export.
78

9+
The tray walls seat into the floor rather than sitting on top of it, so
10+
a wood bevel cannot open daylight at the joint. Handles are thinner in
11+
Y than the chassis they tenon into. The tyre is a flat felloe wrap, not
12+
a torus.
13+
814
It asserts **budget conformance** of the generated result. It does not
915
witness an API contract. "It rendered without error" is not a check.
1016

@@ -21,39 +27,83 @@ materials, UVs, evaluated LOD, collider, or export file.
2127

2228
| Axis | Declared | Measured (4.5.11 / 5.1.2 / 5.2.1) |
2329
| --- | --- | --- |
24-
| Base triangles | 2980–3200 | 3088 / 3088 / 3088 |
30+
| Base triangles | 2300–2800 | 2500 / 2500 / 2500 |
2531
| LOD1 ratio | 0.32–0.62 of base | 0.5000 / 0.5000 / 0.5000 |
26-
| LOD2 ratio | 0.10–0.35 of base | 0.2196 / 0.2196 / 0.2014 |
27-
| Materials | exactly 2 distinct, ≥24 metal faces | 2 slots, 308 metal |
32+
| LOD2 ratio | 0.10–0.35 of base | 0.2200 / 0.2200 / 0.2104 |
33+
| Materials | exactly 2 distinct; ≥700 wood, ≥180 metal faces | 2 slots; 1094 / 190 |
2834
| UVs | in `0..1`, AABB overlap ≤ 1e-5 | in range, overlap 0 |
29-
| Outer AABB | (1.418, 0.463, 0.594) m ± 0.01 | (1.4176, 0.4627, 0.5937), zmin 0 |
30-
| Collider tris | ≤ 140 | 106 |
31-
| Export | written, size > 0 | 227404 / 227404 / 227388 bytes |
35+
| Outer AABB | (1.558, 0.630, 0.574) m ± 0.015 | (1.5556, 0.6300, 0.5720), zmin 0 |
36+
| Collider tris | ≤ 220 | 90 |
37+
| Export | written, size > 0 | 187576 / 187576 / 187560 bytes |
38+
39+
### Hygiene
40+
41+
Recomputed from the generated mesh, not asserted about the script.
42+
43+
| Axis | Declared | Measured (all three) |
44+
| --- | --- | --- |
45+
| Non-manifold edges | 0 | 0 |
46+
| Loose verts / edges | 0 / 0 | 0 / 0 |
47+
| Doubles merged at 1e-5 | 0 | 0 |
48+
| Zero-area faces | 0 | 0 |
49+
| N-gons | 0 | 0 |
50+
| Coplanar disjoint face pairs | 0 | 0 |
51+
| Grounded: `zmin` | within 1e-4 of 0 | 0.0000 |
52+
| Named supports: 2 shoes + tyre | each `zmin` ≤ 1e-3 | shoe_z 0.00000, tyre_z 0.00000 |
53+
| Tray size | (0.720, 0.532, 0.220) m ± 0.02 | (0.7200, 0.5320, 0.2200) |
54+
55+
### Joint fit and seat
56+
57+
| Axis | Declared | Measured (all three) |
58+
| --- | --- | --- |
59+
| Spoke clearance (hub − spoke) | ≥ 0.010 m | 0.04000 |
60+
| Handle-tray overlap | gap ≤ 0.020 m | −0.07062 |
61+
| Wall-floor seat | ≥ 0.005 m | 0.01200 |
62+
| Metal-wood BVH gap | ≤ 0.010 m | 0.00000 |
63+
| Tread aspect (tyre width / radial) | ≥ 2.5 | 5.111 |
3264

3365
DECIMATE COLLAPSE triangle counts are **not** identical across series —
34-
5.2.1 is more aggressive on LOD2. The gate is a ratio band, not an
35-
exact count. Bake pixels are stochastic; the gate is `has_data` plus
36-
operator `FINISHED`, not byte-identity. Construction uses no RNG.
37-
Export byte counts differ by 16 B on 5.2.1 (glTF serializer), not a
38-
gated axis.
66+
5.2.1 is leaner on LOD2. The gate is a ratio band, not an exact count.
67+
Bake pixels are stochastic; the gate is `has_data` plus operator
68+
`FINISHED`, not byte-identity. Construction uses no RNG. Export byte
69+
counts differ by 16 B on 5.2.1 (glTF serializer), not a gated axis.
70+
71+
### Falsifiers
3972

40-
`--skip-decimate` skips the LOD DECIMATE stage so LOD1 ratio is 1.0 and
41-
exit 9 fires. That is the named budget the falsifier violates.
73+
Each violates one named budget. All eight were run on 4.5.11, 5.1.2 and
74+
5.2.1 and returned the same code on each.
75+
76+
| Flag | Budget violated | Exit |
77+
| --- | --- | --- |
78+
| `--skip-decimate` | LOD1 ratio band | 9 |
79+
| `--stray-vert` | loose vertex count is 0 | 15 |
80+
| `--lift-z` | bounding box `zmin` is 0 | 16 |
81+
| `--short-legs` | named shoe supports at Z=0 | 16 |
82+
| `--fat-spokes` | spoke clearance inside the hub | 17 |
83+
| `--float-walls` | wall-floor seat | 17 |
84+
| `--pipe-rim` | tread aspect (torus on a flat felloe) | 18 |
4285

4386
## Run
4487

4588
```bash
4689
blender --background --python wheelbarrow.py --
4790
blender --background --python wheelbarrow.py -- --skip-decimate
91+
blender --background --python wheelbarrow.py -- --stray-vert
92+
blender --background --python wheelbarrow.py -- --lift-z
93+
blender --background --python wheelbarrow.py -- --short-legs
94+
blender --background --python wheelbarrow.py -- --fat-spokes
95+
blender --background --python wheelbarrow.py -- --float-walls
96+
blender --background --python wheelbarrow.py -- --pipe-rim
4897
blender --background --python wheelbarrow.py -- --output barrow.png
4998
```
5099

51-
Smoke does not pass `--output` or `--skip-decimate`.
100+
Smoke passes no flags.
52101

53102
## Exit codes
54103

55104
File-local. `9` is a valid check code. `10` is reserved for
56-
`gallery_framing.check_framing` on the `--output` path.
105+
`gallery_framing.check_framing` on the `--output` path. `15``19` are the
106+
hygiene and joint-fit family.
57107

58108
| Code | Meaning |
59109
| --- | --- |
@@ -62,7 +112,7 @@ File-local. `9` is a valid check code. `10` is reserved for
62112
| 2 | argparse / usage |
63113
| 3 | Mesh did not build / no UV layer |
64114
| 4 | Base triangle count outside range |
65-
| 5 | Material count ≠ 2 distinct slots, or wood/metal faces missing |
115+
| 5 | Material count ≠ 2 distinct slots, or a face-count floor missed |
66116
| 6 | UVs outside 0..1 |
67117
| 7 | UV AABB overlap above tolerance |
68118
| 8 | World AABB off declared outer size |
@@ -72,3 +122,8 @@ File-local. `9` is a valid check code. `10` is reserved for
72122
| 12 | Bake did not finish or image has no data |
73123
| 13 | Export file missing or empty |
74124
| 14 | `--output` produced no file |
125+
| 15 | Mesh hygiene: loose, non-manifold, zero-area, doubles, n-gons, z-fight |
126+
| 16 | Not grounded: bounding box `zmin` off 0, or a named shoe/tyre floats |
127+
| 17 | Joint fit: spoke clearance, handle join, wall-floor seat, or metal-wood gap |
128+
| 18 | Seat: tread aspect of the tyre |
129+
| 19 | Tray size off the stated real-world dimensions |

showcase/wheelbarrow/preview.webp

6.85 KB
Loading

0 commit comments

Comments
 (0)