code wiki / _hdl_build / nx_footcheck.nx
nx_footcheck.nx
buildroot/runtime/_hdl_build/nx_footcheck.nx
about
nx_footcheck.nx -- ★THE DISTAL-LIMB STRUCTURE JUDGE (beyond-metahuman program).
WHY THIS EXISTS, and it is a correction of my own work. I filed seq1038 claiming the toes had NO part
header of their own and that the emitter therefore lofted ONE continuous ribbon weaving foot->toe1->toe2.
That was WRONG. Reading the GENERATED canon (knowledge/canon_gx34r.dat) shows six part headers in the
foot's rotated frame -- one tube plus five separate toe tubes -- exactly as emitDigitP intends. I had
misread my own probe output: the probe printed the OWNING part beside each ring, and because all six
headers are BYTE-IDENTICAL (`P 1 90 48 40 -41 0`, since every toe inherits the foot frame and carries its
spread in the ring xoff) I read six identical headers as one repeated header.
★★★THE LAW THAT COST ME: READING THE GENERATED DATA IS NOT ENOUGH IF THE THING YOU ARE COUNTING IS
INDISTINGUISHABLE FROM ITS NEIGHBOUR. Print the INDEX, not just the row. A judge that a human eye has to
disambiguate is a judge that will be misread -- so the answer is this organ: the count is MEASURED.
★AND THE REAL DEFECT, which the numbers give up immediately once you subtract them:
foot tube runs y 0 -> 145 toes are based at y 118 and reach y 152 (hallux)
so 27 of each toe's 34 units are BURIED INSIDE THE FOOT TUBE. Only 7 units of the hallux clear the tube
at all, and the fifth toe ends at 128 -- seventeen units SHORT of the tube's own tip, entirely invisible.
That is the "blunt hoof with pale nubs" the render shows. nx_body_proc even carries the correct
instruction in a comment -- "toes must REPLACE the flat toe-plate, not extend past it" -- and only the
second half was ever applied: the toes were shortened to fit inside a plate that should have been deleted.
★A HALF-APPLIED FIX IS INDISTINGUISHABLE FROM NO FIX, AND IT LOOKS LIKE A DONE ONE IN THE SOURCE.
A second, smaller defect falls out of the same subtraction. Read along the foot the quantity (zoff + rb)
-- the sole side of every ring -- and the tube holds a CONSTANT 40: a flat sole, correct. The toes give
43. The toes hang three units BELOW the sole plane, so the figure's ground contact is its toe tips.
WHAT IT MEASURES (all from the canon text, no rendering, no mesh, no third party):
burial tube_end - toe_base must be <= 0: the tube must END where the toes BEGIN
protrusion foot_len - tube_end must be >= 20% of foot length -- toes are a fifth of a foot
sole break max(zoff+rb) toes - same tube must be <= 0: no toe may pierce the sole plane
foot length max y over the WHOLE group ★INVARIANT -- silhouette-critical, must not move when fixed
The last one is the regression guard the source comment asked for and never got: a previous round grew
the toes to y 174, the height-normalised side silhouette fell 831 -> 723, and the lesson was written down
as prose instead of as a test. Prose does not fail a build.
nx_footcheck check <canon.dat> [rot] -> the measured report + verdict for a real artifact
nx_footcheck selftest -> gv gate: proves the JUDGE discriminates, on fixtures
license_tier: ORIGINAL expect_exit: 0 No hw writes (Rule 26).
dependencies 1 imports · 0 importers
imports: nx_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
| 41 | const FC_MAGIC_1000000: i64 = 1000000 |
| 43 | const FC_MAXP: i64 = 256 |
| 44 | const FC_MAXR: i64 = 4096 |
| 45 | const FC_PROT: i64 = 16 |
| 46 | const FC_RP: i64 = 272 |
| 47 | const FC_RY: i64 = 4368 |
| 48 | const FC_RX: i64 = 8464 |
| 49 | const FC_RZ: i64 = 12560 |
| 50 | const FC_RA: i64 = 16656 |
| 51 | const FC_RB: i64 = 20752 |
| 52 | const FC_SZ: i64 = 24848 |
| 53 | const FC_Q: i64 = 1000 |
| 57 | const FC_MINPROT: i64 = 200 |
| 58 | const FC_NTOE: i64 = 5 |
| 59 | const FC_ROTFOOT: i64 = 90 |
| 60 | const FC_OUT: i64 = 16 |
functions
| 62 | func fc_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 63 | func fc_pn(v: i64) -> i64 |
| 72 | func fc_streq(a: *u8, b: *u8) -> i64 called by 1: main |
| 77 | func fc_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } called by 1: fc_run_fx |
| 78 | func fc_atoi(s: *u8) -> i64 called by 1: main |
| 86 | func fc_lineints(b: *u8, s: i64, e: i64, out: *i64, maxn: i64) -> i64 called by 1: fc_parse |
| 119 | func fc_parse(b: *u8, sz: i64, A: *i64) -> i64 |
| 173 | func fc_measure(A: *i64, rot: i64, out: *i64) -> i64 |
| 246 | func fc_ok(out: *i64) -> i64 |
| 254 | func fc_report(out: *i64) -> i64 |
| 276 | func fc_fx_bad() -> *u8 called by 1: fc_gate |
| 279 | func fc_fx_good() -> *u8 called by 1: fc_gate |
| 282 | func fc_run_fx(s: *u8, out: *i64) -> i64 |
| 287 | func fc_gate() -> i64 |
| 343 | func main(argc: i64, argv: *i64) -> i64 |