Solids
Units passing difftest says the port matches the C++ function by function; this page says
whether whole solids come out. The primitives example
(crates/solidcore/examples/primitives)
builds each primitive through the public API in pure Rust and checks that it is a closed manifold solid with the
analytic Euler-Poincare characteristic, volume, area and bounding box (relative tolerance
1e-09). A primitive that stops at code not ported yet names the
unit and upstream symbol it is blocked on.
Solids: 9/9 build, 9/9 pass.
Primitives
From reports/solids.json (CI's latest
main run). Each check shows the measured value, the analytic one and the relative error; a check
that could not be measured says so. Hover a failed check for its message.
| Primitive | Status | Blocker | Closed manifold | Euler | F, E, V | Volume | Area | Bounding box |
|---|---|---|---|---|---|---|---|---|
| box 5x10x20 | passes | none | PASS yes expected yes | PASS 2 expected 2 | PASS (6, 12, 8) expected (6, 12, 8) | PASS 1000 expected 1000; rel. err 1.14e-16 | PASS 700 expected 700; rel. err 0.00e+00 | PASS (0, 0, 0) – (5, 10, 20) expected (0, 0, 0) – (5, 10, 20); rel. err 0.00e+00 |
| cylinder r5 h20 | passes | none | PASS yes expected yes | PASS 2 expected 2 | – | PASS 1570.796327 expected 1570.796327; rel. err 5.11e-12 | PASS 785.3981635 expected 785.3981634; rel. err 1.21e-10 | PASS (-5, -5, 0) – (5, 5, 20) expected (-5, -5, 0) – (5, 5, 20); rel. err 0.00e+00 |
| cone r5->2 h20 | passes | none | PASS yes expected yes | PASS 2 expected 2 | – | PASS 816.8140899 expected 816.8140899; rel. err 6.81e-11 | PASS 535.8496432 expected 535.8496431; rel. err 7.76e-11 | PASS (-5, -5, 0) – (5, 5, 20) expected (-5, -5, 0) – (5, 5, 20); rel. err 0.00e+00 |
| pyramid 5 h20 | passes | none | PASS yes expected yes | PASS 2 expected 2 | PASS (5, 8, 5) expected (5, 8, 5) | PASS 166.6666667 expected 166.6666667; rel. err 6.82e-16 | PASS 226.5564437 expected 226.5564437; rel. err 1.25e-16 | PASS (-2.5, -2.5, 0) – (2.5, 2.5, 20) expected (-2.5, -2.5, 0) – (2.5, 2.5, 20); rel. err 1.67e-16 |
| sphere r3 | passes | none | PASS yes expected yes | PASS 2 expected 2 | – | PASS 113.0973356 expected 113.0973355; rel. err 2.15e-10 | PASS 113.0973355 expected 113.0973355; rel. err 1.52e-10 | PASS (-2, -5, -2.5) – (4, 1, 3.5) expected (-2, -5, -2.5) – (4, 1, 3.5); rel. err 8.55e-17 |
| sphere r3 (no pole) | passes | none | PASS yes expected yes | PASS 2 expected 2 | – | PASS 113.0973355 expected 113.0973355; rel. err 1.09e-10 | PASS 113.0973355 expected 113.0973355; rel. err 4.99e-11 | PASS (-2, -5, -2.5) – (4, 1, 3.5) expected (-2, -5, -2.5) – (4, 1, 3.5); rel. err 0.00e+00 |
| partial sphere r3 0..90 | passes | none | PASS yes expected yes | PASS 2 expected 2 | – | PASS 28.27433388 expected 28.27433388; rel. err 8.87e-11 | PASS 56.54866777 expected 56.54866776; rel. err 1.38e-11 | PASS (1, -2, -2.5) – (4, 1, 3.5) expected (1, -2, -2.5) – (4, 1, 3.5); rel. err 0.00e+00 |
| torus R5 r1.5 | passes | none | PASS yes expected yes | PASS 0 expected 0 | – | PASS 222.066099 expected 222.066099; rel. err 8.99e-11 | PASS 296.0881321 expected 296.088132; rel. err 1.45e-10 | PASS (-6.5, -5.5, -2.5) – (6.5, 7.5, 0.5) expected (-6.5, -5.5, -2.5) – (6.5, 7.5, 0.5); rel. err 5.96e-18 |
| partial torus R5 r1.5 0..90 | passes | none | PASS yes expected yes | PASS 2 expected 2 | – | PASS 55.51652476 expected 55.51652476; rel. err 1.02e-10 | PASS 88.15919995 expected 88.15919995; rel. err 6.29e-11 | PASS (-2.042717741e-15, 1, -2.5) – (6.5, 7.5, 0.5) expected (0, 1, -2.5) – (6.5, 7.5, 0.5); rel. err 2.11e-16 |
Corpus (real models)
Placeholder: pass rate TBD, waiting on the choice of a corpus of real models.
Each model will be read, its mass properties computed, and the result compared with the
reference: per model the JSON's corpus.models[] records name, source,
built, pass, blocker, and expected vs actual
volume, area and center_of_mass with their rel_err.