Meshing test corpus
Generated by cargo xtask corpus; do not edit. The parts are our own: SolidCraft recipes in
tests/corpus/<name>/recipe.json and analytic shapes generated in code
(crates/testkit/src/corpus.rs). Each run rebuilds every part, tessellates it at a chordal
tolerance of 1e-3 of its bounding-box diagonal and runs every stage on it. Times are wall
clock on the machine that ran it; every other column is deterministic on one platform.
Regression gate
Each part’s results are frozen in tests/corpus/<name>/fixture.json (an analytic shape’s
directory holds only its fixture), in the oracle’s format (docs/verification.md):
stages: every stage’s outcome, compared exactly:ok(with the method, for the hex stage),no: <kind>when the mesher refuses the part (a limit of the method today, such as no structured hex method fitting) orerror: <kind>. A part that starts or stops meshing is a change either way.values: the measures. Counts (tetrahedra, slivers, Steiner points, hexes, boundary vertices, genus) have a band of 0; reals (volumes, dihedral angles, radius ratios, scaled Jacobians) a band of 10⁻⁹ of their size plus 10⁻¹², and a relative difference (the enclosed volume against the exact one) 10⁻⁹. On one platform a run is deterministic bit for bit; the bands absorb only last-digit differences of the system maths library. Times are never frozen.platforms: each platform the fixture was blessed on, with what it measures differently. The tessellation of curved faces differs in its last bits between macOS aarch64 and Linux x86_64 (SolidCraft’s tessellation calls the system maths library), and the tet mesher turns that into a different mesh: on curved parts the tetrahedron counts, the smallest dihedral angles and the octree’s scaled Jacobians differ, by far more than a band could allow and still gate anything. That is a determinism bug (#115); until it is fixed each platform is checked against its own results, and a part whoseplatformsentries are empty measures the same on both. A fix for #115 empties them.
Every tet mesh of the quality stage is also checked on the test side
(crates/testkit/src/validity.rs), independently of the mesher’s gate: every tetrahedron
positive; every face held by one tetrahedron (boundary) or two on opposite sides (inside); the
boundary faces a closed, consistently oriented 2-manifold without a pinched vertex; no
tetrahedron joined to the rest by a vertex or an edge only, and one face-connected piece per
solid; the mesher’s list of boundary faces equal to the faces held once. The column mesh validity shows the result.
cargo xtask corpus and the heavy test corpus_matches_its_fixtures (CI’s heavy job, on Linux
x86_64) fail when a part moves from its fixture, has none, or breaks an invariant.
Blessing
When a change moves a part on purpose, bless it and say in the pull request what moved and why that is right (more tetrahedra from a finer size field, a part that now meshes with the hex sweep). A part that stops meshing or meshes worse is a regression until shown otherwise. A broken invariant is a bug, never a fixture value: blessing does not hide it, and the run fails until the mesher is fixed.
Bless on both platforms, macOS first, then Linux x86_64 in CI. On the Mac:
cargo xtask corpus --bless <name> # or --bless all; --jobs 4 meshes four parts at once
Push the branch, then bless the same parts on Linux x86_64 with the Corpus bless workflow
(.github/workflows/corpus-bless.yml), on the runner and toolchain of CI’s heavy job. It runs
cargo run --release -p fieldcraft-testkit --bin corpus -- --bless <name> --jobs N --no-write on
the branch (--no-write: this page keeps the Mac’s times), lists what moved in the run’s summary
and uploads the fixtures that changed as the artifact corpus-fixtures-linux-x86_64; it pushes
nothing. Copy them into the worktree and fold them into the commit that moved the parts:
gh workflow run corpus-bless.yml -R tangency-labs/fieldcraft --ref <branch> -f parts='<name> <name>' # or all; -f jobs=4
gh run list -R tangency-labs/fieldcraft --workflow corpus-bless.yml --branch <branch> --limit 1
gh run download <run-id> -R tangency-labs/fieldcraft -n corpus-fixtures-linux-x86_64 -D <dir>
cp -R <dir>/tests/corpus/. tests/corpus/
The run fails, after uploading what it blessed, when a part it did not bless moved or a tet mesh broke an invariant. A run that changed nothing uploads no artifact: the parts measure on Linux what their fixtures record.
A bless on a platform the fixture already records rewrites the fixture from that platform alone when its results moved (the other platforms’ results are stale then, and the run there fails until it is blessed there too); a bless on a platform the fixture does not record yet adds what it measures differently. Blessing a part whose results did not move changes nothing.
Results
| part | categories | bodies | faces | triangles | tol. mm | build ms | enclosed mm³ | SolidCraft mm³ | rel. diff | exact mm³ | boundary | genus | feature edges | check ms | CDT tets | Steiner | cavities | tet gate | CDT ms | quality tets | min dihedral ° | max dihedral ° | min radius ratio | slivers CDT → mesh | quality gate | mesh validity | quality ms | hex | hex elements | hex8 min SJ | hex20 min SJ | hex ms | octree hexes | min SJ | mean SJ | hex vol. diff | octree ms |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| bent-tube | sweepable, thin-wall, genus | 1 | 8 | 9068 | 0.121 | 696 | 4109.9 | 4159.8 | -1.2e-2 | 4159.8 | ok, 4534 vertices | 1 | 172 | 24.9 | 14746 | 133 | 0 | pass | 730 | 18984 | 33.4 | 137.2 | 0.361 | 222 → 0 | pass | ok | 4229 | sweep | 464 | 0.913 | 0.969 | 150 | no: Tube: meshing failed: octree hex meshing failed after 4 builds: the core’s boundary has components of genus [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | 84692 | |||
| bolted-assembly | assembly, blocky | 3 | 20 | 1468 | 0.117 | 245 | 33006.3 | 32998.9 | 2.2e-4 | 32998.9 | ok, 736 vertices | 0, 1, 1 | 238 | 6.0 | 2120 | 33 | 0 | pass | 65 | 13234 | 33.1 | 136.0 | 0.329 | 230 → 0 | pass | ok | 2039 | extrude | 437 | 0.518 | 0.518 | 119 | 41348 | 0.323 | 0.959 | 2.6e-4 | 19566 |
| cantilever-i-beam | sweepable, thin-wall | 1 | 14 | 1648 | 0.208 | 63 | 61600.0 | 61600.0 | -4.4e-15 | 61600.0 | ok, 826 vertices | 0 | 504 | 8.1 | 3057 | 312 | 20 | 4 flat | 111 | 11294 | 34.2 | 137.9 | 0.341 | 129 → 0 | pass | ok | 3190 | extrude | 432 | 0.308 | 0.308 | 86 | 351220 | 0.308 | 0.977 | -7.9e-14 | 70447 |
| cooling-enclosure | blocky, small-feature | 2 | 12 | 628 | 0.060 | 48 | 4672.0 | 4672.0 | -5.8e-16 | 4672.0 | ok, 318 vertices | 0, 0 | 168 | 2.7 | 799 | 27 | 0 | pass | 21 | 7729 | 37.7 | 132.9 | 0.370 | 9 → 0 | pass | ok | 1085 | extrude | 411 | 1.000 | 1.000 | 78 | 256344 | 0.321 | 0.993 | -8.9e-13 | 95620 |
| cooling-heat-sink | thin-wall, blocky, sweepable | 1 | 30 | 2026 | 0.060 | 187 | 11280.0 | 11280.0 | 9.7e-16 | 11280.0 | ok, 1015 vertices | 0 | 586 | 10.7 | 4275 | 533 | 11 | 6 flat | 198 | 10221 | 36.7 | 137.6 | 0.327 | 71 → 0 | pass | ok | 3400 | extrude | 1054 | 0.997 | 0.997 | 537 | 165862 | 0.056 | 0.949 | 3.2e-4 | 144030 |
| cross-cylinders | boolean, sharp | 1 | 8 | 3934 | 0.087 | 203 | 32173.0 | 32365.8 | -6.0e-3 | 32365.8 | ok, 1969 vertices | 0 | 240 | 8.9 | 9914 | 0 | 0 | pass | 267 | 9671 | 34.1 | 139.2 | 0.305 | 5676 → 0 | pass | ok | 2731 | no: Cross: not supported yet: no structured hex method fits this body (extrude: cylindrical face 4 is not parallel to the direction; sweep: from face 5: linking face 0: the shared edges do not form one chain; from face 1: face 6 is reached twice (not | 13 | no: Cross: meshing failed: octree hex meshing failed after 4 builds: regions of patches 0 and 3 meet where the part has no curve; regions of patches 0 and 3 meet where the part has no curve; regions of patches 0 and 3 meet where the part has no curve; | 1211 | ||||||
| filleted-bracket | fillet, genus, sweepable | 1 | 11 | 2002 | 0.088 | 377 | 32168.0 | 32144.8 | 7.2e-4 | 32144.8 | ok, 999 vertices | 2 | 216 | 8.5 | 2827 | 18 | 0 | pass | 109 | 7044 | 33.8 | 136.5 | 0.293 | 286 → 0 | pass | ok | 1746 | no: Bracket: not supported yet: no structured hex method fits this body (extrude: cylindrical face 0 is not parallel to the direction; sweep: from face 5: face 3 is parallel to the source and only part of the ring reaches it: the body ends at more than | 10 | 30701 | 0.301 | 0.963 | 1.0e-3 | 6362 | |||
| filleted-bracket-blocks | fillet, genus, partitioned | 30 | 188 | 5426 | 0.088 | 1471 | 32166.3 | 32144.8 | 6.7e-4 | 32144.8 | ok, 2773 vertices | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 | 1420 | 23.2 | 6921 | 108 | 0 | 1 flat | 233 | 173871 | 31.2 | 138.6 | 0.324 | 359 → 0 | pass | ok | 17609 | blocks (30 cells, 45 shared faces) | 4986 | 0.705 | 0.705 | 700 | 63442 | 0.112 | 0.908 | 1.1e-3 | 18604 |
| i-beam | sweepable, thin-wall | 1 | 14 | 1648 | 0.208 | 43 | 61600.0 | 61600.0 | -3.8e-15 | 61600.0 | ok, 826 vertices | 0 | 504 | 8.2 | 2799 | 228 | 14 | 3 flat | 110 | 11977 | 36.1 | 138.4 | 0.338 | 146 → 0 | pass | ok | 4124 | extrude | 432 | 0.308 | 0.308 | 79 | 351220 | 0.308 | 0.977 | 2.2e-13 | 67933 |
| loft-transition | organic | 1 | 6 | 1882 | 0.075 | 54 | 56303.4 | 56370.0 | -1.2e-3 | – | ok, 943 vertices | 0 | 156 | 4.6 | 2698 | 0 | 0 | pass | 74 | 8819 | 34.7 | 138.4 | 0.364 | 569 → 0 | pass | ok | 1271 | sweep | 2873 | 0.154 | 0.109 | 450 | 3134 | 0.293 | 0.886 | -2.5e-3 | 646 |
| perforated-plate | genus, thin-wall, sweepable | 1 | 30 | 5854 | 0.144 | 2234 | 26822.3 | 26764.2 | 2.2e-3 | 26764.2 | ok, 2881 vertices | 24 | 949 | 32.1 | 8111 | 51 | 0 | pass | 296 | 13957 | 32.7 | 137.6 | 0.331 | 245 → 0 | pass | ok | 3667 | extrude | 998 | 0.628 | 0.628 | 488 | 185383 | 0.120 | 0.955 | 2.5e-3 | 45094 |
| pinhole-block | small-feature, genus | 1 | 22 | 16900 | 0.073 | 1705 | 49925.2 | 49909.5 | 3.1e-4 | 49909.5 | ok, 8420 vertices | 16 | 6504 | 53.9 | 33304 | 137 | 0 | pass | 1022 | 740915 | 17.5 | 159.5 | 0.097 | 10869 → 0 | pass | ok | 75168 | extrude | 5222 | 0.413 | 0.534 | 938 | no: Block: meshing failed: octree hex meshing failed after 4 builds: 4 elements fail the certified validity check; 3 elements fail the certified validity check; 1 elements fail the certified validity check; 1 elements fail the certified validity check | 49878 | |||
| rounded-box | fillet | 1 | 26 | 6904 | 0.054 | 895 | 23317.6 | 23340.8 | -9.9e-4 | 23340.8 | ok, 3454 vertices | 0 | 642 | 20.4 | 12387 | 9 | 0 | pass | 359 | 26917 | 35.1 | 137.3 | 0.333 | 5533 → 0 | pass | ok | 6135 | no: Box: not supported yet: no structured hex method fits this body (extrude: face 0 is curved across the direction; sweep: from face 20: 12 faces are not on the sweep path; from face 23: 12 faces are not on the sweep path; revolve: face 2 is not a | 23 | 76294 | 0.469 | 0.984 | -1.7e-3 | 15930 | |||
| shallow-groove | near-tangent, boolean | 1 | 8 | 384 | 0.075 | 86 | 47802.5 | 47781.5 | 4.4e-4 | 47781.5 | ok, 194 vertices | 0 | 98 | 1.9 | 475 | 2 | 0 | pass | 16 | 5703 | 36.0 | 133.7 | 0.397 | 21 → 0 | pass | ok | 716 | extrude | 1960 | 0.991 | 0.986 | 273 | 2926 | 0.303 | 0.920 | 5.0e-4 | 667 |
| sharp-wedge | sharp, thin-wall, sweepable | 1 | 5 | 1032 | 0.083 | 47 | 3200.0 | 3200.0 | -1.4e-16 | 3200.0 | ok, 518 vertices | 0 | 236 | 7.9 | 1289 | 12 | 0 | pass | 56 | 24178 | 1.4 | 177.6 | 0.002 | 131 → 1026 | pass | ok | 15518 | extrude | 1674 | 0.014 | 0.014 | 505 | no: Wedge: limit reached: the part has walls 0.0104167 thick, which 3 cells across need cells of 0.00347222: 7 levels below a size of 3.30236; or 6 levels below a size of 2.53125; the limits are 4 levels (max_depth) and 500000 cells (max_elements) | 8 | |||
| sphere-on-plate | near-tangent, boolean | 1 | 7 | 4072 | 0.098 | 138 | 69351.2 | 69509.7 | -2.3e-3 | 69509.7 | ok, 2038 vertices | 0 | 61 | 10.2 | 4405 | 19 | 2 | pass | 376 | 11096 | 32.9 | 141.3 | 0.291 | 942 → 0 | pass | ok | 3271 | no: Plate: not supported yet: no structured hex method fits this body (extrude: face 6 is curved across the direction; sweep: from face 5: 1 faces are not on the sweep path; from face 0: linking face 6 has no top side; revolve: no axis to try; mapped: | 14 | 43501 | 0.319 | 0.941 | 5.9e-3 | 27778 | |||
| spline-vase | organic | 1 | 5 | 3694 | 0.106 | 1216 | 94681.9 | 94951.3 | -2.8e-3 | – | ok, 1849 vertices | 0 | 182 | 10.5 | 6814 | 0 | 0 | pass | 181 | 11810 | 35.9 | 138.8 | 0.321 | 3294 → 0 | pass | ok | 2907 | sweep | 4554 | 0.698 | 0.698 | 685 | 43551 | 0.388 | 0.926 | -3.6e-3 | 7108 |
| stepped-block | blocky, sharp | 1 | 14 | 168 | 0.078 | 67 | 47000.0 | 47000.0 | -1.5e-16 | 47000.0 | ok, 84 vertices | 1 | 82 | 0.9 | 266 | 25 | 0 | pass | 10 | 5074 | 39.7 | 131.1 | 0.373 | 5 → 0 | pass | ok | 642 | extrude | 1416 | 1.000 | 1.000 | 197 | 56774 | 0.081 | 0.955 | 3.0e-6 | 46189 |
| thin-ribs | thin-wall, blocky | 1 | 26 | 5988 | 0.119 | 188 | 32000.0 | 32000.0 | 3.5e-15 | 32000.0 | ok, 2996 vertices | 0 | 1468 | 26.6 | 11830 | 1276 | 78 | 2 flat | 484 | 63079 | 33.3 | 137.3 | 0.322 | 642 → 0 | pass | ok | 15557 | extrude | 1659 | 0.114 | 0.114 | 379 | no: Plate: limit reached: the part has walls 0.8 thick, which 3 cells across need cells of 0.266667: 3 levels below a size of 4.76252, more than 2655508 grid cells by level 3; or 2 levels below a size of 2.4, more than 1333614 grid cells by level 2; t | 359 | |||
| thin-wall-enclosure | thin-wall, blocky | 1 | 11 | 1402 | 0.108 | 123 | 15564.0 | 15564.0 | -1.1e-14 | 15564.0 | ok, 703 vertices | 0 | 342 | 6.2 | 2095 | 101 | 13 | pass | 69 | 28743 | 31.6 | 144.6 | 0.263 | 533 → 0 | pass | ok | 8881 | extrude | 1714 | 0.707 | 0.707 | 4343 | no: Enclosure: limit reached: the part has walls 1 thick, which 3 cells across need cells of 0.333333: 3 levels below a size of 4.30813, more than 3941156 grid cells by level 3; or 2 levels below a size of 3, more than 1022976 grid cells by level 2; the l | 251 | |||
| analytic-sphere | analytic | 1 | 1 | 5156 | 0.069 | 138 | 33400.1 | 33510.3 | -3.3e-3 | 33510.3 | ok, 2580 vertices | 0 | 0 | 8.9 | 5410 | 4 | 0 | pass | 424 | 14491 | 33.8 | 140.9 | 0.324 | 1271 → 0 | pass | ok | 4647 | no: Sphere: not supported yet: no structured hex method fits this body (extrude: no direction to try; sweep: no planar face to sweep from; revolve: no axis to try; mapped: not a logical cube: 1 faces and 1 edges (6 and 12 needed)) | 14 | 2400 | 0.538 | 0.866 | -1.3e-2 | 632 | |||
| analytic-torus | analytic, genus | 1 | 1 | 8904 | 0.109 | 198 | 37619.6 | 37899.3 | -7.4e-3 | 37899.3 | ok, 4452 vertices | 1 | 0 | 17.9 | 30258 | 3 | 0 | pass | 842 | 23678 | 32.9 | 141.4 | 0.327 | 20769 → 0 | pass | ok | 6779 | revolve | 2475 | 0.774 | 0.774 | 422 | 18815 | 0.453 | 0.881 | -1.3e-2 | 3584 |
| analytic-cylinder | analytic, sweepable | 1 | 3 | 2308 | 0.049 | 103 | 12510.2 | 12566.4 | -4.5e-3 | 12566.4 | ok, 1156 vertices | 0 | 103 | 6.0 | 4926 | 5 | 1 | pass | 118 | 7796 | 33.4 | 135.1 | 0.328 | 2392 → 0 | pass | ok | 1368 | extrude | 3200 | 0.850 | 0.850 | 477 | 2424 | 0.536 | 0.919 | -1.0e-2 | 446 |
| analytic-pipe | analytic, genus, sweepable | 1 | 4 | 3256 | 0.104 | 219 | 94081.4 | 94247.8 | -1.8e-3 | 94247.8 | ok, 1628 vertices | 1 | 220 | 7.9 | 4823 | 7 | 0 | pass | 188 | 7341 | 35.8 | 136.0 | 0.330 | 277 → 0 | pass | ok | 2186 | extrude | 1288 | 0.998 | 0.998 | 189 | 53680 | 0.527 | 0.944 | -1.6e-3 | 8997 |
| analytic-plate-hole | analytic, genus, sweepable | 1 | 7 | 676 | 0.224 | 58 | 98469.5 | 98429.2 | 4.1e-4 | 98429.2 | ok, 338 vertices | 1 | 164 | 3.5 | 988 | 52 | 0 | pass | 30 | 2588 | 33.8 | 137.1 | 0.348 | 25 → 0 | pass | ok | 487 | extrude | 502 | 0.650 | 0.628 | 189 | 163680 | 0.309 | 0.989 | 4.3e-4 | 26297 |
Categories
| category | stresses | parts |
|---|---|---|
| thin-wall | walls thin against the part’s size | 8 |
| small-feature | features much smaller than the part | 2 |
| fillet | blends between faces | 3 |
| genus | through holes (genus > 0) | 8 |
| sharp | sharp edges and acute dihedral angles | 3 |
| near-tangent | faces meeting at a shallow angle | 2 |
| boolean | intersection curves from booleans | 3 |
| sweepable | extrusions and sweeps (one-to-one sweep meshing) | 10 |
| blocky | axis-aligned blocks (polycube-friendly) | 6 |
| organic | free-form, lofted or revolved spline surfaces | 2 |
| assembly | several bodies placed by component transforms | 1 |
| partitioned | split into cells that each mesh as a mapped block (conforming multi-block hex) | 1 |
| analytic | closed-form geometry for solver verification | 5 |
Parts
bent-tube: A 10 mm tube with a 1 mm wall, bent through R30: a thin-walled sweep along a line-arc-line path.bolted-assembly: A base plate with a clamp block component placed twice, once turned 90 degrees: bodies placed by component transforms.cantilever-i-beam: The 200 mm I-beam ofi-beamlying along X with its web upright (Z up): a sweep along a horizontal axis, and the cantilever of the README demo.cooling-enclosure: A 40 x 44 mm PCB, 2 mm thick, standing upright with a 16 x 6 x 12 mm chip on its face, as two bodies: the natural-convection cooling sample’s parts (docs/examples.md).cooling-heat-sink: A 40 x 40 mm heat sink, a 3 mm base with six 1.5 mm fins 18 mm tall at a 6 mm pitch: thin, closely spaced fins on a plate (the forced-convection cooling sample, docs/examples.md).cross-cylinders: Two orthogonal R10 cylinders joined: equal radii, so the intersection curves cross at two singular points.filleted-bracket: An 8 mm L-bracket with an R6 inside fillet and a hole through each leg: a blend beside holes.filleted-bracket-blocks: The filleted bracket split into 30 cells with SolidCraft’s Split Body (three slabs across its width, the corner halved along its diagonal, an O-grid of four cells round each hole) so that every cell is a mapped block: conforming multi-block hex meshing.i-beam: A 200 mm I-beam with 3 mm flanges and a 2 mm web: a long sweepable prism with thin walls.loft-transition: A 40 mm square lofted to an R15 circle 50 mm above: a ruled free-form surface between unlike sections.perforated-plate: A 3 mm plate perforated by a 6 x 4 grid of 6 mm holes: genus 24 in a thin sheet.pinhole-block: A 50 mm block drilled through by sixteen 0.6 mm pinholes: features 80 times smaller than the part, genus 16.rounded-box: A 40 x 30 x 20 box with every edge rounded R3: cylinder and sphere blends meeting at the corners.shallow-groove: A block with a 0.5 mm deep groove cut by an R30 cylinder: groove walls 10 degrees off the top face.sharp-wedge: A wedge whose faces meet at under 3 degrees: a sharp edge with a needle-thin cross-section.sphere-on-plate: A sphere sunk 0.1 mm into a plate: the faces meet at under 6 degrees around a 2 mm circle.spline-vase: A vase revolved from a spline profile: doubly curved faces of varying curvature around a closed axis.stepped-block: Three stacked blocks with a slot cut through the base: axis-aligned steps for polycube and octree meshers.thin-ribs: A 4 mm plate carrying five 0.8 mm ribs 20 mm tall: thin walls standing on a thicker base.thin-wall-enclosure: An 80 x 60 x 40 box shelled to 1 mm walls, open on top: thin walls over a large span.analytic-sphere: Sphere r 20: curvature everywhere, no edges.analytic-torus: Torus 30/8: genus 1 with doubly curved faces and no edges.analytic-cylinder: Cylinder r 10, h 40: the round bar of beam and torsion checks.analytic-pipe: Thick-walled pipe 20/30, length 60: the Lamé cylinder.analytic-plate-hole: Plate 200 x 100 x 5 with a 20 mm hole: the Kirsch plate.