code wiki / _hdl_build / nx_biotwin_morpho.nx
nx_biotwin_morpho.nx
buildroot/runtime/_hdl_build/nx_biotwin_morpho.nx
about
nx_biotwin_morpho.nx -- BIOTWIN rung-1 LIBRARY: the MORPHOMETRIC-DERIVATION engine (board axis 8, COU-1).
The biotwin board's computed gap_queue ranks morphometric-derivation #1 (it blocks 4 QOIs). This is the
DERIVATION TRANSFORM: geometry -> numbers. It COMPOSES with the visualise-body substrate (nx_bodyatlas
ba_sdf -- the same sovereign integer SDF being that the Gx north star ships and that QOI[0] visualise-
own-body scores 833 on) and does NOT duplicate it. From the SDF it extracts geometric landmarks, then
derives standard anthropometric morphometric axes -- and CARRIES PROVENANCE ON EVERY AXIS (which input
landmarks, which transform, the input measurement resolution). Integer/fixed-point only (the no-float
doctrine holds for derivation; the FEM/UQ float collision is a SEPARATE, still-unratified question).
RULER (not ours): the banked anthropometric canon in knowledge/anthropometry_banked.txt -- 7.5-heads,
leg/stature, arm/stature, shoulder/hip, fingertip-drop. The same external canon nx_anthro_gate grades
the being against; this engine turns that gate's ad-hoc measurements into first-class, provenanced axes.
THE FENCE (rule-26 never-brick applied to bodies): bm_fence_blocked() carries a PERMANENT PLANTED LIE --
a caller claim that a morphometric measurement is "genomic/clinical ready" -- and a CLAMP that forces it
back to measurement-only every run. A morphometric MEASUREMENT can never be silently promoted to a
clinical or genomic CLAIM: fence_blocked>=1 proves the clamp fires, mechanically, on every invocation.
This composes with the board's axis-21 fence; it does not replace it.
license_tier: ORIGINAL
dependencies 2 imports · 2 importers
imports: nx_syscalls.nxnx_bodyatlas.nx
imported by: nx_biotwin_morphometrics.nxnx_biotwin_morphometrics_gate.nx
structs
| none |
consts
| 24 | const N_MAGIC_100000: i64 = 100000 |
| 25 | const N_MAGIC_1200: i64 = 1200 |
| 26 | const N_MAGIC_99999: i64 = 99999 |
| 27 | const N_MAGIC_1469598103: i64 = 1469598103 |
| 30 | const N_LM: i64 = 8 |
| 31 | const LM_CROWN: i64 = 0 |
| 32 | const LM_SOLE: i64 = 1 |
| 33 | const LM_CHIN: i64 = 2 |
| 34 | const LM_CROTCH: i64 = 3 |
| 35 | const LM_SHW: i64 = 4 |
| 36 | const LM_HIPW: i64 = 5 |
| 37 | const LM_ACRO: i64 = 6 |
| 38 | const LM_FTIP: i64 = 7 |
| 41 | const N_AX: i64 = 5 |
| 42 | const AX_STRIDE: i64 = 7 |
| 43 | const AX_VAL: i64 = 0 // derived value (fixed-point per axis) |
| 44 | const AX_LO: i64 = 1 // canon band low (banked) |
| 45 | const AX_HI: i64 = 2 // canon band high (banked) |
| 46 | const AX_RES: i64 = 3 // coarsest input landmark resolution (+- SDF units) |
| 47 | const AX_NM: i64 = 4 // axis name (str ptr as i64) |
| 48 | const AX_TF: i64 = 5 // transform formula (str ptr as i64) |
| 49 | const AX_IN: i64 = 6 // input landmarks (str ptr as i64) |
| 51 | const N_PROMO: i64 = 3 // promotion-fence claim slots |
| 52 | const NECK_RATIO_PCT: i64 = 60 // chin/neck = where head width collapses below this fraction of head max width |
functions
| 55 | func mo_scan_down(x: i64, z: i64, yhi: i64, ylo: i64) -> i64 |
| 63 | func mo_scan_up(x: i64, z: i64, ylo: i64, yhi: i64) -> i64 |
| 71 | func mo_halfwidth_at(y: i64, lim: i64) -> i64 |
| 82 | func bm_measure(preset: i64, LM: *i64) -> i64 called by 3: bm_derivemainmain calls 7: atlas_hand_curlatlas_buildatlas_posemo_scan_downmo_scan_upmo_halfwidth_at+1 |
| 154 | func bm_derive(preset: i64, OUT: *i64) -> i64 |
| 226 | func bm_fence_blocked() -> i64 |
| 244 | func bm_checksum(preset: i64) -> i64 |