nx_devpaint_gate.nx
buildroot/runtime/nx_devpaint_gate.nx
about
nx_devpaint_gate.nx -- GATE for the derived-scale deviation heatmap and the two root defects it
had to fix first (2026-08-26).
THE TOOTH THAT MATTERED MOST IS THE ONE THE EXISTING GATES COULD NOT HAVE HAD. nx_mmdev_gate and
nx_xport_gate both write their NXMSH2 fixtures through the SAME nx_nxmesh_lib constant they then read
back, so the position-unit constant CANCELS and every round-trip tooth passes at any value of it. It
passed at a value that was wrong by 1000x for every file a real producer writes, and the consequence
was that nx_mmdev -- this estate's exact surface-deviation ruler -- refused every real mesh on its
extent bound. So this gate decodes a LITERAL float32 BIT PATTERN that no writer here produced, and
carries a neg-control showing the old constant would have refused a 1.594 m human body.
The second root defect is the colour codec: nx_mesh2glb decoded a legal colour to zero, tripping its
own bone fallback, so every painted heatmap emitted uniformly bone while the organ printed "per-tri
colour carried". The neg-control below reproduces that exact expression and requires it to be wrong.
license_tier: ORIGINAL
dependencies 6 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_vecmath.nxnx_nxmesh_lib.nxnx_mmdev_lib.nxnx_devpaint_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 DG_SIDE: i64 = 2000 |
| 26 | const DG_LIFT: i64 = 50 |
| 29 | const DG_SLACK: i64 = 1 |
| 32 | const DG_F32_1594MM: i64 = 1153908736 |
| 33 | const DG_EXPECT_1594: i64 = 15940 // 1594 mm in ruler units |
| 34 | const DG_OLD_UNIT_PER_M: i64 = 10000 // the pre-fix multiplier, kept ONLY as a neg-control |
| 35 | const DG_TEST_PERMIL: i64 = 900 |
| 36 | const DG_TEST_U8: i64 = 229 // 900 permille of 255, truncated |
| 37 | const DG_CAND_TRIS: i64 = 3 |
| 45 | const DG_FLOOR_R: i64 = 100 |
| 46 | const DG_FLOOR_G: i64 = 850 |
| 47 | const DG_FLOOR_B: i64 = 150 |
| 48 | const DG_MID_R: i64 = 950 |
| 49 | const DG_MID_G: i64 = 550 |
| 50 | const DG_MID_B: i64 = 80 |
| 51 | const DG_TOP_R: i64 = 850 |
| 52 | const DG_TOP_G: i64 = 100 |
| 53 | const DG_TOP_B: i64 = 850 |
functions
| 55 | func dg_near(a: i64, b: i64, slack: i64) -> i64 |
| 63 | func dg_col_is(buf: *u8, tb: i64, t: i64, r: i64, g: i64, bl: i64) -> i64 |
| 71 | func dg_ref(buf: *u8) -> i64 |
| 86 | func dg_cand(buf: *u8, lift: i64, corner_only: i64) -> i64 |
| 103 | func main() -> i64 |