code wiki / _hdl_build / nx_meshpose.nx

nx_meshpose.nx

buildroot/runtime/_hdl_build/nx_meshpose.nx

18090 B419 linesdepth 2pulls 3 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_meshpose.nx -- THE POSE-MATCH INSTRUMENT (form ladder 1785935557; measured rung 2026-08-05: the per-part table showed error growing MONOTONICALLY along each kinematic chain -- shoulder 10mm to fingertips 357mm -- the signature of pose mismatch about the joint, not form error). Rotates declared REGIONS of a mesh about declared PIVOTS, region and pivot and angle all DATA rows, never code. Per-vertex selection (a boundary triangle STRETCHES rather than tears -- a crude skin). v1 rotates about the Z axis (lateral raise in the XY plane) -- the measured need; other axes are named rungs. Discipline: `report` measures the cluster ranges FIRST so pose rows are chosen from measurement, not from eyeballing a render. nx_meshpose report <in.nxmesh> <ylo_pm> <yhi_pm> -> x-cluster RANGES (per-mille) in that band nx_meshpose apply <in.nxmesh> <out.nxmesh> <posefile> -> rotated copy (layers/colors preserved) nx_meshpose selftest POSE ROWS (tab-separated): rot <xlo> <xhi> <ylo> <yhi> <pivotx_pm> <pivoty_pm> <deg> bounds+pivot in per-mille of the mesh's own bbox; deg positive = counter-clockwise in +x-right/+y-up. license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_itrig.nx nx_meshpose.nx

imports: nx_syscalls.nxnx_itrig.nx

imported by: nobody (leaf or entry point)

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

main hw sys_write sys_exit pz_selftest st_fix sys_mmap st_w32 pz_w32 pz_um2f sys_openat_wr sys_write ↻ sys_close st_wr sys_openat_wr ↻ sys_write ↻ sys_close ↻ hw ↻ pz_apply sys_mmap ↻ pz_readall sys_openat_rd sys_read sys_close ↻ pz_bbox pz_u32 pz_f2um pz_refuse hw ↻ pz_u32 ↻ pz_eol pz_cols pz_int it_sin4096 it_cos4096 it_sin4096 ↻ pz_f2um ↻ pz_w32 ↻ pz_um2f ↻ sys_openat_wr ↻

structs

none

consts

18const PZ_MAGIC_65536: i64 = 65536
19const PZ_MAGIC_4096: i64 = 4096
20const PZ_MAGIC_500000: i64 = 500000
21const PZ_MAGIC_100000: i64 = 100000
22const PZ_MAGIC_400000: i64 = 400000
23const PZ_MAGIC_98000: i64 = 98000
24const PZ_MAGIC_102000: i64 = 102000
25const PZ_MAGIC_402000: i64 = 402000
26const PZ_MAGIC_398000: i64 = 398000
28const PZ_CAP: i64 = 33554432
29const PZ_BINS: i64 = 128
30const PZ_GAP: i64 = 2
31const PZ_M8388607: i64 = 8388607
32const PZ_M8388608: i64 = 8388608
33const PZ_BIG: i64 = 4611686018427387903
34const PZ_TAB: i64 = 9
35const PZ_NL: i64 = 10
36const PZ_TWOPI: i64 = 25736

functions

38func hw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
39func pn(v: i64) -> i64 { let b: *u8=sys_mmap(32) as *u8; var x: i64=v; var ng: i64=0; if x<0{ng=1;x=0-x} var i: i64=31; if x==0{b[i]=48 as u8;i=i-1} while x>0{b[i]=(48+x%10) as u8;x=x/10;i=i-1} if ng==1{b[i]=45 as u8;i=i-1} sys_write(1,(b as i64+i+1) as *u8,31-i); return 0 }
40func pz_u32(b: *u8, o: i64) -> i64 { return (b[o] as i64) + ((b[o+1] as i64)<<8) + ((b[o+2] as i64)<<16) + ((b[o+3] as i64)<<24) }
41func pz_w32(b: *u8, o: i64, v: i64) -> i64 { b[o]=(v&255) as u8; b[o+1]=((v>>8)&255) as u8; b[o+2]=((v>>16)&255) as u8; b[o+3]=((v>>24)&255) as u8; return 0 }
called by 2: pz_applyst_w32
43func pz_f2um(w: i64) -> i64
57func pz_um2f(v: i64) -> i64
called by 2: pz_applyst_fix
72func pz_refuse(reason: *u8) -> i64 { hw("MESHPOSE REFUSED: " as *u8); hw(reason); hw("\n" as *u8); return 0 }
called by 2: pz_reportpz_apply calls 1: hw
73func pz_readall(path: *u8, buf: *u8, cap: i64) -> i64
86func pz_argint(s: *u8) -> i64
called by 1: main
99func pz_int(b: *u8, a: i64, e: i64) -> i64
called by 1: pz_apply
112func pz_eol(b: *u8, n: i64, i: i64) -> i64
called by 1: pz_apply
118func pz_cols(b: *u8, ls: i64, le: i64, col: *i64, maxc: i64) -> i64
called by 1: pz_apply
135func pz_bbox(b: *u8, n: i64, bb: *i64) -> i64
called by 2: pz_reportpz_apply calls 2: pz_u32pz_f2um
171func pz_report(path: *u8, ylo: i64, yhi: i64) -> i64
239func pz_apply(inp: *u8, outp: *u8, posep: *u8) -> i64
323func st_w32(b: *u8, o: i64, v: i64) -> i64 { return pz_w32(b, o, v) }
called by 1: st_fix calls 1: pz_w32
324func st_fix(path: *u8) -> i64
351func st_wr(path: *u8, s: *u8) -> i64
360func pz_selftest() -> i64
396func main(argc: i64, argv: *i64) -> i64