nx_boneheat_gate.nx
buildroot/runtime/nx_boneheat_gate.nx
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
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
structs
| none |
consts
| 18 | const BHG_DIR: *u8 = "/tmp/nx_boneheat_gate" |
| 19 | const BHG_MODE_DIR: i64 = 493 // 0755 |
| 20 | const BHG_AROUND: i64 = 4 // square cross-section: 4 axis-aligned corners -> 4 axis-aligned faces |
| 21 | const BHG_R: i64 = 400 // 4 mm half-width in 0.01 mm units |
| 22 | const BHG_LEN: i64 = 4000 // 40 mm prism |
| 23 | const BHG_RINGS: i64 = 41 // one ring per mm |
| 24 | const BHG_MID: i64 = 2000 |
| 25 | const BHG_SHELL_LEN: i64 = 2000 |
| 26 | const BHG_SHELL_RINGS: i64 = 21 |
| 27 | const BHG_SHELL_DX: i64 = 2000 // second shell centre: 12 mm of air between the surfaces |
| 28 | const BHG_CELLS: i64 = 64 // fixture grid, passed explicitly so the gate never depends on the conf file |
| 29 | const BHG_VERT_CAP: i64 = 1024 |
| 30 | const BHG_TRI_CAP: i64 = 4096 |
| 31 | const BHG_JOINT_CAP: i64 = 8 |
| 32 | const BHG_RING_ROOT: i64 = 5 // z = 5 mm |
| 33 | const BHG_RING_MID: i64 = 20 // z = 20 mm, the middle joint |
| 34 | const BHG_RING_FAR: i64 = 35 // z = 35 mm |
| 35 | const BHG_ROOT: i64 = 0 - 1 |
functions
| 37 | func 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 |
| 39 | func bhg_ring_xy(k: i64, out: *i64) -> i64 called by 1: bhg_prism |
| 46 | func bhg_tri(tris: *i64, st: *i64, a: i64, b: i64, c: i64) -> i64 called by 1: bhg_prism |
| 53 | func bhg_prism(vert: *i64, tris: *i64, st: *i64, cx: i64, z0: i64, z1: i64, rings: i64, caps: i64) -> i64 |
| 100 | func bhg_joint(skel: *i64, j: i64, parent: i64, x: i64, y: i64, z: i64) -> i64 called by 1: main |
| 106 | func bhg_write(path: *u8, vert: *i64, tris: *i64, st: *i64, skel: *i64, nj: i64) -> i64 |
| 117 | func bhg_open(path: *u8, lp: *i64) -> i64 |
| 122 | func bhg_w(b: *u8, flen: i64, v: i64, j: i64) -> i64 |
| 132 | func bhg_wsum(b: *u8, flen: i64, v: i64) -> i64 |
| 142 | func bhg_wmax(b: *u8, flen: i64, v: i64) -> i64 |
| 152 | func bhg_files_equal(pa: *u8, pb: *u8) -> i64 |
| 165 | func main() -> i64 |