code wiki / _hdl_build / nx_anat_consistency_gate.nx
nx_anat_consistency_gate.nx
buildroot/runtime/_hdl_build/nx_anat_consistency_gate.nx
about
nx_anat_consistency_gate.nx -- ★CROSS-ARTIFACT ANATOMY CHECK (2026-07-27).
Two organs in this codebase independently describe where a human's joints are:
nx_skelgen -- generates a rest skeleton from anthropometric rules, emits J rows in millimetres
nx_bodyatlas -- a ZygoteBody-style peelable being with its OWN skeleton pivots, authored months
earlier for an unrelated purpose
★★NOBODY HAD EVER COMPARED THEM, and on 2026-07-27 that cost was measured: nx_skelgen's acromion sat
at 120 per-mille of stature while this atlas's own shoulder pivot sits at 206 -- a disagreement of
about 150mm on a 1750mm body, shipped and green in both organs for as long as both existed.
★THE PRINCIPLE THIS ENFORCES is the one nx_skelgen already states about its own internals: two tables
cannot disagree when there is only one table -- and where a second table is legitimate (a different
representation for a different job), it must be CHECKED rather than trusted. Both sides are converted
to PER-MILLE OF THEIR OWN STATURE first, so the comparison is scale-free and neither organ's unit
system is privileged.
⚠WHAT THIS DOES **NOT** ASSERT: that the two must be identical. A shoulder JOINT CENTRE is legitimately
inboard of an ACROMION, so the girdle check is a BRACKET (joint <= acromion <= bony outer edge), not an
equality. Asserting equality there would force one of two correct numbers to become wrong.
nx_anat_consistency_gate <skel.dat> (the file nx_skelgen writes)
license_tier: ORIGINAL expect_exit: 0 No hw writes (Rule 26).
dependencies 2 imports · 0 importers
imports: nx_bodyatlas.nxnx_gate_verdict.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 26 | const AC_MM: i64 = 1000 |
| 29 | const AC_TOL: i64 = 10 |
| 31 | const AC_BSHL: i64 = 1 |
| 32 | const AC_BSHR: i64 = 3 |
| 33 | const AC_BHIPL: i64 = 5 |
| 34 | const AC_BHIPR: i64 = 7 |
| 35 | const AC_BKNEEL: i64 = 6 |
| 36 | const AC_BKNEER: i64 = 8 |
| 38 | const AC_JACR: i64 = 5 |
| 39 | const AC_JHIP: i64 = 9 |
| 40 | const AC_JKNEE: i64 = 10 |
| 41 | const AC_MAXJ: i64 = 64 |
functions
| 43 | func ac_iabs(v: i64) -> i64 { if v < 0 { return 0 - v } return v } called by 1: main |
| 44 | func ac_isdig(c: i64) -> i64 { if c >= 48 { if c <= 57 { return 1 } } return 0 } called by 1: ac_tok |
| 45 | func ac_tok(b: *u8, n: i64, p: *i64, out: *i64) -> i64 |
| 72 | func ac_nextline(b: *u8, n: i64, p: *i64) -> i64 called by 1: ac_load_skel |
| 82 | func ac_load_skel(path: *u8, JX: *i64, JY: *i64, JZ: *i64) -> i64 |
| 121 | func ac_skel_stature(JY: *i64, nj: i64) -> i64 called by 1: main |
| 128 | func main(argc: i64, argv: *i64) -> i64 |