code wiki / (root) / nx_autorig_mesh_gate.nx

nx_autorig_mesh_gate.nx

buildroot/runtime/nx_autorig_mesh_gate.nx

9835 B216 linesdepth 5pulls 9 transitivereach 0 importersview sourcekind gate/prooftopic autorig
docsdependenciesstructsconstsfunctions

about

nx_autorig_mesh_gate.nx -- proves the one-call auto-rig is FAITHFUL, not a new arithmetic. A bare prism goes through nx_autorig_mesh in one call and, SEPARATELY, through cs_run then bh_run by hand; the two skeletons and the two skinned rigs must be BYTE-IDENTICAL, so this organ only adds an entry point. It also proves the one call actually produced a rig (VERT+TRIS+SKEL+SKIN, weights summing to the NXA 4096 at every vertex -- the anti-vacuity tooth: a no-op that copied the mesh would carry no SKIN) and that a volumeless sheet is refused by name at the skeleton stage. SUBJECT: nx_autorig_mesh via amesh_run, in-process. license_tier: ORIGINAL expect_exit: 0

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_nxa.nx nx_autorig_mesh.nx nx_autorig_mesh_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_nxa.nxnx_autorig_mesh.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻ sys_mkdir sys_mmap ↻ mg_prism sys_mmap ↻ mg_ring_xy mg_tri mg_write sys_mmap ↻ nxa_tag4 bh_nxa_write sys_mmap ↻ nxa_check2 nxa_magic sys_openat_wr sys_write ↻ sys_close amesh_run cs_run cs_run_cells sys_mmap ↻

structs

none

consts

13const MG_DIR: *u8 = "/tmp/nx_autorig_mesh_gate"
14const MG_MODE_DIR: i64 = 493
15const MG_AROUND: i64 = 4
16const MG_LEN: i64 = 6000
17const MG_RINGS: i64 = 61
18const MG_R: i64 = 300
19const MG_CELLS: i64 = 64
20const MG_VCAP: i64 = 2048
21const MG_TCAP: i64 = 8192
22const MG_SKIN_SUM: i64 = 4096
23const MG_SHEET_N: i64 = 8 // an 8x8 flat grid in z=0: triangulated, zero volume, cs must refuse it

functions

25func mgw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: hw_num_line calls 1: sys_write
26func mg_ring_xy(k: i64, r: i64, out: *i64) -> i64
called by 1: mg_prism
33func mg_tri(tris: *i64, st: *i64, a: i64, b: i64, c: i64) -> i64
called by 2: mg_prismmg_sheet
39func mg_prism(vert: *i64, tris: *i64, st: *i64) -> i64
called by 1: main calls 3: sys_mmapmg_ring_xymg_tri
82func mg_sheet(vert: *i64, tris: *i64, st: *i64) -> i64
called by 1: main calls 1: mg_tri
109func mg_write(path: *u8, vert: *i64, tris: *i64, st: *i64) -> i64
called by 1: main calls 3: sys_mmapnxa_tag4bh_nxa_write
118func mg_open(path: *u8, lp: *i64) -> i64
called by 1: main calls 1: sys_read_file
123func mg_files_equal(pa: *u8, pb: *u8) -> i64
called by 1: main calls 2: sys_mmapsys_read_file
136func mg_skin_badsum(b: *u8, flen: i64) -> i64
called by 1: main calls 2: nxa_findnxa_tag4
153func mg_has(b: *u8, flen: i64, tag: *u8) -> i64 { if nxa_find(b, flen, nxa_tag4(tag)) >= 0 { return 1 } return 0 }
called by 1: main calls 2: nxa_findnxa_tag4
155func main() -> i64
216func hw_num_line(v: i64) -> i64 { mgw(" value=" as *u8); gv_num(v); mgw("\n" as *u8); return 0 }
called by 1: main calls 2: mgwgv_num