feat: degenerate-bevel-weld example#112
Merged
Merged
Conversation
Isolates the half-dimension bevel collapse found authoring gltf-export-roundtrip: a slab beveled at offset == min_dim/2 pinches its band into exactly 12 zero-area faces (4 min-axis edges x 3 segments) with 16 coincident verts (4 x (segments+1)) and min_area down 3.2e5x, while the safe offset yields none. The export angle is the point: a stdlib re-parse of the shipped GLB recomputes every triangle area from raw POSITION + indices buffers and counts 32 degenerate triangles crossing the boundary (MEASURED regression constant, re-measure recipe in check) versus 0 for the safe mesh — the loops an engine merge-by-distance welds. Probed five regimes to ground the closed forms (clamp on/off x safe/half/over, modifier vs bmesh path). Byte-identical on 4.5.11 and 5.1.2. Falsified: safe offset at threshold (exit 3), degenerate offset below it (exit 4), coincident closed form corrupted (exit 6), GLB census off (exit 8). Render path gated with check_framing (0.794x/0.356y, margins >= 0.100); dual tray with live-data seam markers. Count prose bumped to 40 across README/CLAUDE/AGENTS. Signed-off-by: fOuttaMyPaint <TMhospitalitystrategies@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Degenerate bevel weld — the half-dimension collapse that ships to disk
Second of two examples. Isolates the bevel-threshold hazard found authoring
gltf-export-roundtrip(its count check caught a 36-vertex weld on a thin crate part): author a bevel width against one box, reuse it on a thinner one, and atoffset == min_dimension / 2the band pinches into zero-area faces — which then cross the export boundary.The contract (all closed form or independently re-derived)
A 1.6 × 0.4 × 1.0 slab (min dim 0.4 → half = 0.2), every edge beveled at 3 segments:
min_areacollapses 3.241e+05× (5.783e-04 → 1.784e-09).EXPECT_VERTS, re-measure recipe incheck()) vs 0 for the safe mesh. The exporter ships every loop (384 positions == 384 loops) — nothing warns you.Probed five regimes to ground these (clamp on/off × safe/half/over, bmesh vs modifier path, OBJ vs GLB, smooth vs flat shading) before locking the contract; the bmesh clamped path gives the cleanest closed forms (12 / 16 / 32). One probe-side bug found and fixed along the way: per-object exports need
use_selectionormeshes[0]is the wrong mesh.Falsification evidence
All restored; final check exits 0 with
degenerate-bevel-weld OK threshold@0.2 collapse 12f/16v ships 32 degenerate tris in the GLB.Framing (measured, gallery_framing silhouette)
fill 0.794x / 0.356y, margins L0.100 R0.106 B0.133 T0.339 — in band on 5.1.2 and identical on 4.5.11. Gate wired via
check_framing(exit 10).Visual-pass log (3 render iterations)
Runtime
Local binaries:
.scratch/blender-5.1.2-windows-x64/blender.exe(reports Blender 5.1.2),.scratch/blender-4.5.11-windows-x64/blender.exe(reports Blender 4.5.11 LTS). Check-only exit 0 on both with byte-identical output (same counts, same min_area values, same GLB census — no version divergence). Sub-second runtime; the new smoke step is check-only, so smoke runtimes are unaffected. CI floats within series per CLAUDE.md.Live-run vs inspection-only
Test plan
blender --background --python examples/degenerate-bevel-weld/degenerate_bevel_weld.py --→ exit 0, all five measured lines as above (4.5 LTS and 5.1).-- --output out.png→ framing lines printframing_ok, exit 0, artifact written.