code wiki / (root) / nx_boneheat_gate.nx

nx_boneheat_gate.nx

buildroot/runtime/nx_boneheat_gate.nx

17639 B329 linesdepth 3pulls 7 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_boneheat_gate.nx -- THE REFEREE FOR THE SOVEREIGN AUTO-WEIGHTS: a geodesic solve must BLEND at a joint, must NOT bleed across air, must announce an unsealed mesh instead of refusing it, must refuse a mesh with no skeleton BY NAME, and must be byte-deterministic -- while the nearest-joint control (modding MD4's own accept-rule control) is shown to do exactly what the geodesic solve exists to stop. Fixtures are BUILT AT RUN TIME under /tmp/nx_boneheat_gate (a detector that scans source must never meet its own fixture) and are AXIS-ALIGNED SQUARE PRISMS on purpose: their four walls and two caps lie on coordinate planes, so the voxeliser seals them without depending on the tilted-face dilation (that dilation stays in the lib for real meshes; the fixture must isolate the WEIGHT solve, not the seam heuristic). A closed prism with a three-joint chain; the same prism open at both ends; two prisms separated by 12 mm of air where one shell's joint is Euclidean-nearer to the other shell's vertices than that shell's own joint. Every solve is IN-PROCESS through nx_boneheat_lib, so a mutant of the lib is reached. license_tier: ORIGINAL expect_exit: 0

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_nxa.nx nx_boneheat_lib.nx nx_boneheat_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_nxa.nxnx_boneheat_lib.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 ↻ bhg_prism sys_mmap ↻ bhg_ring_xy bhg_tri bhg_joint bhg_write sys_mmap ↻ nxa_tag4 bh_nxa_write sys_mmap ↻ nxa_check2 nxa_magic sys_openat_wr sys_write ↻ sys_close gv_check gv_puts ↻ bh_run

structs

none

consts

18const BHG_DIR: *u8 = "/tmp/nx_boneheat_gate"
19const BHG_MODE_DIR: i64 = 493 // 0755
20const BHG_AROUND: i64 = 4 // square cross-section: 4 axis-aligned corners -> 4 axis-aligned faces
21const BHG_R: i64 = 400 // 4 mm half-width in 0.01 mm units
22const BHG_LEN: i64 = 4000 // 40 mm prism
23const BHG_RINGS: i64 = 41 // one ring per mm
24const BHG_MID: i64 = 2000
25const BHG_SHELL_LEN: i64 = 2000
26const BHG_SHELL_RINGS: i64 = 21
27const BHG_SHELL_DX: i64 = 2000 // second shell centre: 12 mm of air between the surfaces
28const BHG_CELLS: i64 = 64 // fixture grid, passed explicitly so the gate never depends on the conf file
29const BHG_VERT_CAP: i64 = 1024
30const BHG_TRI_CAP: i64 = 4096
31const BHG_JOINT_CAP: i64 = 8
32const BHG_RING_ROOT: i64 = 5 // z = 5 mm
33const BHG_RING_MID: i64 = 20 // z = 20 mm, the middle joint
34const BHG_RING_FAR: i64 = 35 // z = 35 mm
35const BHG_ROOT: i64 = 0 - 1

functions

37func hw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
calls 1: sys_write
39func bhg_ring_xy(k: i64, out: *i64) -> i64
called by 1: bhg_prism
46func bhg_tri(tris: *i64, st: *i64, a: i64, b: i64, c: i64) -> i64
called by 1: bhg_prism
53func bhg_prism(vert: *i64, tris: *i64, st: *i64, cx: i64, z0: i64, z1: i64, rings: i64, caps: i64) -> i64
called by 1: main calls 3: sys_mmapbhg_ring_xybhg_tri
100func bhg_joint(skel: *i64, j: i64, parent: i64, x: i64, y: i64, z: i64) -> i64
called by 1: main
106func bhg_write(path: *u8, vert: *i64, tris: *i64, st: *i64, skel: *i64, nj: i64) -> i64
called by 1: main calls 3: sys_mmapnxa_tag4bh_nxa_write
117func bhg_open(path: *u8, lp: *i64) -> i64
called by 1: main calls 1: sys_read_file
122func bhg_w(b: *u8, flen: i64, v: i64, j: i64) -> i64
called by 1: main calls 2: nxa_findnxa_tag4
132func bhg_wsum(b: *u8, flen: i64, v: i64) -> i64
called by 1: main calls 2: nxa_findnxa_tag4
142func bhg_wmax(b: *u8, flen: i64, v: i64) -> i64
called by 1: main calls 2: nxa_findnxa_tag4
152func bhg_files_equal(pa: *u8, pb: *u8) -> i64
called by 1: main calls 2: sys_mmapsys_read_file
165func main() -> i64