code wiki / _hdl_build / nx_meshprofile.nx

nx_meshprofile.nx

buildroot/runtime/_hdl_build/nx_meshprofile.nx

14368 B296 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_meshprofile.nx -- ★WHERE DOES THE SURFACE STEP? The instrument that should have been built before the third hypothesis (seq1472). Three guesses at the profile-prior banding were each built and rendered and each refuted: axial C0 creasing, layer superposition, part-edge divergence. That is three build-and-look cycles spent proposing causes instead of one measurement locating one. This organ locates it: it reduces a mesh to its RADIUS PROFILE about the vertical axis -- max radius per y band -- and reports the bands where that profile JUMPS. A visible ring IS a step in this curve, so the largest jumps NAME the stations to go look at. Output is deliberately a SHORTLIST, not a dump: the top jumps with their per-mille stations, so two runs can be compared by eye in a dozen lines instead of two hundred. nx_meshprofile <in.nxmesh> [layer -1|0|1|2] license_tier: ORIGINAL expect_exit: 0 No hw writes (Rule 26).

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_itoa_lib.nx nx_meshprofile.nx

imports: nx_syscalls.nxnx_itoa_lib.nx

imported by: nobody (leaf or entry point)

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

main mp_puts sys_write mp_layers sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close mp_puts ↻ mp_rd32 mp_num nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap sys_write ↻ sys_exit sys_mmap ↻ sys_read_file ↻ mp_rd32 ↻ mp_f32 mp_isqrt mp_num ↻

structs

none

consts

17const MP_MAGIC_8388607: i64 = 8388607
18const MP_MAGIC_8388608: i64 = 8388608
19const MP_MAGIC_1152921504606846976: i64 = 1152921504606846976
21const MP_TS: i64 = 84
22const MP_NB: i64 = 128 // y bands over the mesh's own height
23const MP_TOP: i64 = 12 // jumps reported
24const MP_FAR: i64 = 2000000000
25const MP_SCALE: i64 = 1000 // read vertices at micrometre precision, as nx_meshview does

functions

27func mp_puts(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 2: mp_layersmain calls 1: sys_write
32func mp_num(v: i64) -> i64 { nxi_out(v); return 0 }
called by 2: mp_layersmain calls 1: nxi_out
33func mp_rd32(b: *u8, o: i64) -> i64
called by 2: mp_layersmain
37func mp_f32(bits: i64, scale: i64) -> i64
called by 1: main
49func mp_isqrt(v: i64) -> i64
called by 1: main
66func mp_layers(path: *u8) -> i64
94func main(argc: i64, argv: *i64) -> i64