nx_skullskin_gate.nx
buildroot/runtime/nx_skullskin_gate.nx
about
nx_skullskin_gate.nx -- gate for the skull-bound tissue-depth skin (aesthetictwin AT46, 2026-09-18).
ACCEPT RULE, PRE-DECLARED BEFORE THE FIRST RENDER (the coordinator's rule, with the two bars this lane could measure):
(i) the photo ruler (nx_photomark_lib, the promoted ruler's own library, in-process) must FIND a face on the skin render
with BOTH canthi of BOTH eyes (the baseline diora_fit_close.png reads UNMEASURED: no eye pair, measured 2026-09-18);
(ii) the scale-free axes the ruler measures are PRINTED (canthal tilt per side, intercanthal_index, intercanthal_eq_fissure)
and the intercanthal index must sit inside the canon band knowledge/facecanon.conf declares (intercanthal_index
380..420). The NME against knowledge/refintake/diora_baird.oracle is NOT measurable in-lane: the oracle carries rows
for the reference stills only and a render gets an oracle row only from the outside oracle (MediaPipe on the laptop);
(iii) the skin's midline profile extrema sit at the canon's thirds: the glabella-to-subnasale span equals the subnasale-
to-menton span within the tissue-depth table's own spread (max voting depth minus min voting depth);
(iv) no skin vertex penetrates the skull: the depth field is positive at every vertex; min/median/max are printed;
(v) neg-control-zero-depth-field: every depth zero -> the skin equals the skull (max displacement 0);
neg-control-doubled-cheek-fat: doubling one compartment moves ONLY vertices inside its 3-sigma support (partition
printed and summed). Values are emitted with gv_kv/gv_check_eq/gv_check_near for independent adjudication.
The arithmetic teeth run on a synthetic sphere fixture with PLANTED anchors (closed-form expectations computed here, not
by the library); the anatomy teeth run on the real generated skull (a precondition: supplied as argv[1], else
./nx_skullsdf.elf is run from the estate root, ~130 s at 2 mm cells; absent -> those teeth SKIP, never acquit).
Fixtures under /tmp/nx_skullskin_gate/. license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_tissuefield_lib.nxnx_photomark_lib.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
| 25 | const SKG_DIR: *u8 = "/tmp/nx_skullskin_gate" |
| 26 | const SKG_SPHERE: *u8 = "/tmp/nx_skullskin_gate/sphere.nxmesh" |
| 27 | const SKG_SKULL: *u8 = "/tmp/nx_skullskin_gate/skull.nxmesh" |
| 31 | const SKG_SKULL_REPO: *u8 = "knowledge/gates/nx_skullskin_gate.skull.nxmesh" |
| 32 | const SKG_SKULL_ROOT: *u8 = "buildroot/knowledge/gates/nx_skullskin_gate.skull.nxmesh" |
| 33 | const SKG_SKIN: *u8 = "/tmp/nx_skullskin_gate/skin.nxmesh" |
| 34 | const SKG_RENDER: *u8 = "/tmp/nx_skullskin_gate/skin_close.png" |
| 35 | const SKG_CONF: *u8 = "knowledge/tissue_depth.conf" |
| 36 | const SKG_CONF_PARENT: *u8 = "../knowledge/tissue_depth.conf" |
| 37 | const SKG_CANON: *u8 = "knowledge/facecanon.conf" |
| 38 | const SKG_CANON_PARENT: *u8 = "../knowledge/facecanon.conf" |
| 39 | const SKG_SKULL_PARENT: *u8 = "../buildroot/knowledge/gates/nx_skullskin_gate.skull.nxmesh" |
| 40 | const SKG_MODE755: i64 = 493 |
| 41 | const SKG_I64: i64 = 8 |
| 42 | const SKG_W: i64 = 512 |
| 43 | const SKG_H: i64 = 384 |
| 44 | const SKG_SEX_FEMALE_LEANING: i64 = 300 |
| 45 | const SKG_ROBUST: i64 = 500 |
| 46 | const SKG_CELL_UM: i64 = 2000 |
| 47 | const SKG_SPHERE_R: i64 = 800 // an 80 mm sphere: skull-sized, so the kernel widths are in the real range |
| 48 | const SKG_RINGS: i64 = 24 |
| 49 | const SKG_SEGS: i64 = 32 |
| 50 | const SKG_MIN_ROWS: i64 = 20 |
| 51 | const SKG_EXP_TOL: i64 = 4 // Q16 units: the series truncation of two products |
| 52 | const SKG_PLANT_D0: i64 = 50 |
| 53 | const SKG_PLANT_D1: i64 = 80 |
| 54 | const SKG_PLANT_D2: i64 = 120 |
| 55 | const SKG_FAT_MAG: i64 = 30 |
| 56 | const SKG_FAT_RADIUS: i64 = 200 |
| 57 | const SKG_PIPE: i64 = 124 |
| 58 | const SKG_NL: i64 = 10 |
| 59 | const SKG_RGB_BPP: i64 = 3 |
| 60 | const SKG_BYTE: i64 = 255 |
| 61 | const SKG_YAW_FRONTAL: i64 = 0 |
functions
| 63 | func skg_pow2(a: i64) -> i64 { return a * a } called by 1: main |
| 65 | func skg_sphere(M: *i64, r: i64) -> i64 |
| 112 | func skg_plant(T: *i64, M: *i64, name: *u8, v: i64, d: i64) -> i64 |
| 126 | func skg_canon(id: *u8, out: *i64) -> i64 |
| 156 | func skg_skin_thirds(S: *i64, T: *i64, out: *i64) -> i64 |
| 199 | func skg_fb_to_rgb(fb: *i64, n: i64, rgb: *u8) -> i64 called by 1: main |
| 210 | func main(argc: i64, argv: *i64) -> i64 |