Sawhorses and Plank

showcase/sawhorse-plank/

A procedural pair of pine sawhorses carrying a fir plank, with a handsaw leaning against one — tapered legs splayed and housed into each beam, nailed end aprons, eased arrises baked from a rounded high mesh, a toothed blade in a closed apple handle with brass split nuts — through UVs, bake, LOD, collider, and Unity glTF, asserting recomputed budgets rather than an API contract.

Rendered headless by the showcase piece itself. Select it to enlarge.

witnesses Recomputed: 3248 tris, five materials (pine 364, fir 26, steel 1190, beech 340, brass 120 faces), UVs in 0..1 with zero overlap, a 2.440 × 1.135 × 0.7575 m envelope, LOD1 0.5000 and LOD2 0.2198, a 168-tri three-hull collider, a FINISHED normal bake and a 270 kB Unity glTF, hygiene all zero with no coplanar cross-shell faces, and a real two-support span: the plank bearing −0.500 mm into both saddles, all eight feet on the floor (0.000 mm), every leg let 8.58 mm into its beam, every leg splayed 15.000° to the side and 10.000° to the end, a 1.600 m span under an 8 ft 2×10. --skip-decimate exits 9 on LOD1; --stray-vert exits 15 on hygiene; --lift-z exits 16 on grounded zmin; --loose-leg exits 17 with a leg −5.42 mm out of its housing; --short-leg exits 18 with a foot 8.00 mm off the floor; --uneven-splay exits 19 at 19° side splay; --low-horse exits 20 with the plank 5.50 mm above the second saddle.

category Village

tags mesh export showcase

blender --background --python showcase/sawhorse-plank/sawhorse_plank.py --

A pair of traditional pine sawhorses carrying an 8 ft fir plank, with a western handsaw leaning against the near horse. Each horse is a beam on four legs splayed out to the side and out to the end, each leg let 9 mm into the beam's side and nailed through, with an apron across each end's leg pair. A showcase piece, not an example — it witnesses no API contract. It asserts that generated geometry meets declared asset budgets, recomputed from the finished mesh.

What it composes#

Shipped contentUsed for
skills/mesh-editing-and-bmeshsheared-prism legs, aprons cut to the legs' splay, a toothed blade with hand-built caps, a handle prism with a hand-hole (caps from mathutils.geometry.tessellate_polygon), split-nut halves, revolved nail heads, all in one bmesh, chamfered with bmesh.ops.bevel
skills/custom-propertiesface attributes: Part (what each shell is), GrainDir (fibres along Z, X or Y) and WoodTone (one tone per member)
skills/procedural-materials-and-shaderspine and fir with growth rings round each member's long axis, sampled at a per-piece offset through a noise warp: a broad pale earlywood ground and a thin dark latewood line, long fibre streaks for figure, roughness following both, knots in the plank; polished saw steel brushed along its length (stretched noise driving roughness) with rare rust; a coated apple handle; polished brass; the baked normal wired into every slot
skills/bake-high-to-lowCycles tangent-space normal bake, a high with 12-segment nails, a 32-segment hand-hole and a three-round handle outline onto the low's 6, 16 and two rounds
skills/engine-export-presetsUnity glTF (export_yup=True)
skills/depsgraph-and-evaluated-dataevaluated triangle counts for the LOD ratios
snippets/decimate_to_budget.pyLOD1 / LOD2 COLLAPSE chain
snippets/convex_hull_collider.pya hull per horse, one over the plank
snippets/lod_chain.pyLOD naming and ratio pattern
examples/mesh-hygiene-audithygiene combinatorics (copied, not imported)

The budget that matters#

A plank across two sawhorses is a two-support span, and it fails without looking wrong:

The piece measures all four off the finished mesh. Every shell carries a Part face attribute written at build time, so the audit finds the beams, the eight legs and the plank without guessing from shape; each leg is assigned to the nearer beam and to its quadrant.

--low-horse builds the second horse 6 mm lower, legs and all, so every foot is still on the floor and every leg still housed and splayed; only the plank's seat on that saddle fails, +5.50 mm: exit 20. --uneven-splay swings one leg's foot out to 19° from the same top, so its housing and its foot are unchanged and only the splay fails: exit 19. --short-leg stops one leg 8 mm short along its own axis, so its splay holds: exit 18. --loose-leg slides one leg 14 mm out of its housing: exit 17. None of them moves the AABB: the plank, the outer feet and the saw's toe set it, and the saw is placed from the declared beam height, not from the horse a falsifier lowers.

Budgets#

Declared in the script as named constants, recomputed from the generated mesh. Measured values below are from Blender 5.2.1; every value is the same on 4.5.11 and 5.1.2 (see the cross-version table).

BudgetBandMeasured
Base triangles3000–35003248
LOD1 ratio0.32–0.620.5000
LOD2 ratio0.10–0.350.2198
Material slotsexactly 5, distinct5
Pine / fir / steel / beech / brass faces≥ 330 / 24 / 1070 / 300 / 108364 / 26 / 1190 / 340 / 120
UV boundsinside 0..1(0.0009, 0.0009)–(0.9991, 0.9991)
UV AABB overlap≤ 1e-50.000000
Outer AABB2.440 × 1.135 × 0.7575 m ± 0.0202.4400 × 1.1350 × 0.7575
Collider triangles≤ 200164 (three hulls)
Normal bake{'FINISHED'} with image data{'FINISHED'}, has_data=True
glTF exportfile written, non-empty~270 kB
Hygieneall zeroloose 0/0, non-manifold 0, zero-area 0, doubles 0, n-gons 0, coplanar cross-shell pairs 0
Grounded AABB\zmin\≤ 1e-40.00000
Parts2 beams, 8 legs, 4 aprons, 1 plank, 32 nails, 1 blade, 1 handle, 6 split-nut halvesas stated
Leg housing6–14 mm into the beam's side8.58 mm (all eight)
Feet on the flooreach within 0.1 mm0.000 mm (all eight)
Splay15° side, 10° end, ± 0.15° each leg15.0000°, 10.0000° (all eight)
Plank seat−1.0 to −0.2 mm on each saddle, spanning it−0.500 mm, −0.500 mm
Real-world sizespan 1.600, beam 0.950, plank 2.440 × 0.235 × 0.038, each ± 0.0031.6000, 0.9500, 2.4400 × 0.2350 × 0.0380

Real-world size: a traditional sawhorse stands about 30 in to the top of its beam on a 40 in beam with a 21.5 in stance. Here the beam tops are at 0.72 m on 0.95 m beams (90 × 70 mm), the legs are 38 mm stock tapering from 89 mm under the beam to 68 mm at the floor, splayed to a 0.49 m stance, and the plank is a 2×10 (2.44 × 0.235 × 0.038 m) on a 1.6 m span. The handsaw is a 24 in (600 mm) blade tapering from 130 mm at the heel to 60 mm at the toe, on a closed beech handle about 185 × 200 mm.

Construction#

Findings the budgets forced#

Conventions walked#

Every convention in showcase/README.md, and whether it applies here.

ConventionAppliesHow
Deterministic, budgets declared, assertions recomputeyesno RNG; every value above is read off the mesh
Falsifier fails the budget it targetsyestable below
Hygiene incl. cross-shell coplanaryesexit 15
Plumb and real-world sizeyessplay of every leg (--uneven-splay), span, beam and plank sizes; exit 19
A member is tenoned into its seatyeslegs housed into the beams (--loose-leg, exit 17), aprons into the legs, the plank into the saddles, the blade into its handle, the nuts into the cheek
Seat conformance (a band: minimum so it cannot float)yesthe plank on both saddles (--low-horse, exit 20); every foot on the floor (--short-leg, exit 18)
Mirrored assembliesyeseach horse is built from one leg rule mirrored in X and Y; the splay check reads every leg against the same declared angles
Material face floorsyespine 330, fir 24, steel 1070, beech 300, brass 108
One substance, one slotyespine, fir, steel, beech, brass
Shading is part of the modelyestimber, blade and nuts faceted; the handle smooth, every edge over 35° hard
Edge treatmentyesevery timber member and the handle chamfered; one flat segment on the game mesh, three rounded on the bake source, the bake carrying the roundness onto the low; no separate budget, removing the chamfers moves the triangle band first
Sort bmesh operator inputsyesthe bevel's edge list is sorted by index
The bake cage is narrower than the nearest neighbouryesCAGE_EXTRUSION 0.01 m
Level on the stage; stage 60 myesturned about Z only; 60 m floor and wall
Keep a falsifier's envelope stillyesthe plank, outer feet and saw toe set the envelope; no falsifier moves it
Named supports, wrappers, rope, roofs, vessels, scatter, fastenerspartlysupports: the two saddles are named and measured; fasteners: nails and screws are counted as parts

Falsifiers#

Each breaks one pipeline stage so a named budget fails. All seven were run on Blender 4.5.11, 5.1.2 and 5.2.1 and exited the declared code.

FlagTarget budgetBreaksExit
--skip-decimateLOD1 ratiodrops the DECIMATE modifiers, LOD1 ratio goes to 1.00009
--stray-vertmesh hygieneadds one loose vertex inside the first beam15
--lift-zgrounded zminlifts the whole mesh 50 mm16
--loose-legleg housingslides one leg 14 mm out of its beam; housing −5.42 mm17
--short-legfeet on the floorstops one leg 8 mm short along its axis; foot 8.00 mm up18
--uneven-splaysplayswings one leg's foot out to 19° side splay from the same top19
--low-horseplank seat on both saddlesbuilds the second horse 6 mm lower; seat +5.50 mm20

Exit codes#

File-local and sequential. 9 is a valid check code. 1 is the FATAL wrapper — a crash, never a named check.

CodeMeaning
0Success
1Uncaught exception (FATAL wrapper)
2argparse / usage
3Mesh did not build, has no UV layer, or a part count is wrong
4Base triangle count outside band
5Material slots, or a material's face floor
6UVs outside 0..1
7UV AABB overlap above tolerance
8Outer AABB off declared size
9LOD1 or LOD2 ratio outside band (--skip-decimate)
10Framing gate (examples/gallery_framing.py, render path only)
11Collider triangles above ceiling
12Normal bake failed or produced no image data
13glTF export missing or empty
14--output produced no file
15Mesh hygiene (--stray-vert)
16Grounded zmin (--lift-z)
17Leg housing into its beam (--loose-leg)
18A foot off the floor (--short-leg)
19Leg splay or real-world size (--uneven-splay)
20Plank seat on a saddle (--low-horse)
24Asset-quality floors (examples/gallery_asset_quality.py, render path only)

Run it#

# Budget check, no render. A few seconds warm.
blender --background --python sawhorse_plank.py --

# Falsifier: the second horse 6 mm low under the plank. Must exit 20.
blender --background --python sawhorse_plank.py -- --low-horse

# Falsifier: one leg 8 mm short of the floor. Must exit 18.
blender --background --python sawhorse_plank.py -- --short-leg

# Render the gallery still (EEVEE; --engine cycles on a GPU-less host).
blender --background --python sawhorse_plank.py -- --output sawhorse_plank.webp

Smoke runs the check-only path. It does not pass --output or any falsifier.

Cross-version measurements#

Every default run and every falsifier was run on all three binaries (.scratch/blender-<ver>-windows-x64/blender.exe, reporting 4.5.11 LTS, 5.1.2 and 5.2.1 LTS). Every value is identical, the DECIMATE counts included.

Value4.5.115.1.25.2.1
Base triangles324832483248
LOD1 / LOD2 triangles1624 / 7141624 / 7141624 / 714
Faces pine / fir / steel / beech / brass364 / 26 / 1190 / 340 / 120samesame
Collider triangles164164164
Seat, housing, splay−0.500 mm / 8.58 mm / 15° and 10°samesame
Falsifier exits 9 / 15 / 16 / 17 / 18 / 19 / 20all as declaredall as declaredall as declared

Source

showcase/sawhorse-plank/sawhorse_plank.py View the script on GitHub →
Two pine sawhorses with tapered, splayed legs and nailed end aprons carry a long fir plank on a dark studio floor, a polished handsaw with an apple handle leaning on the near one.