code wiki / _hdl_build / nx_profile_fit_provenance_t319.nx

nx_profile_fit_provenance_t319.nx

buildroot/runtime/_hdl_build/nx_profile_fit_provenance_t319.nx

42557 B813 linesdepth 2pulls 3 transitivereach 0 importersview sourcekind tooltopic profile
docsdependenciesstructsconstsfunctions

about

nx_profile_fit.nx -- cross-section shape priors derived from a supplied mesh. Triangle-plane segments are grouped by X projection, then fitted to an ellipse and dimensionless angular radial ratios. This is not full contour segmentation. The procedural emitter controls final dimensions; the ratios remain derived from the source mesh and retain its provenance and applicable obligations. Extraction alone establishes neither anatomical fidelity nor permission to reuse. Infinigen reference-profile lofting is a related research approach, not a claim of implementation equivalence or validated physical accuracy. nx_profile_fit <oracle.nxmesh> <out.dat> [step_permil] [canon_out.dat] [part_id] Optional part_id declares a single-part oracle and bypasses body band grouping. license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_section_projection.nx nx_profile_fit_provenance_t319

imports: nx_syscalls.nxnx_section_projection.nx

imported by: nobody (leaf or entry point)

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

main pf_provenance_run pf_hw sys_write pf_satoi 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 ↻ pf_sin_fill sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close pf_rdbits pf_f32mul pf_rdbits ↻ pf_puts pf_putint sys_mmap ↻ section_project_x_pairs pf_fit_section sys_mmap ↻ pf_wrap pf_isqrt pf_symmetrize

structs

none

consts

16const PF_Q14: i64 = 16384
17const PF_BIG: i64 = 2000000000
18const PF_M8388607: i64 = 8388607
19const PF_M8388608: i64 = 8388608
20const PF_POSQ0: i64 = 4096
21const PF_TARGET: i64 = 200000
22const PF_MAGIC_40500: i64 = 40500
26const PF_NB: i64 = 48
27const PF_MAXST: i64 = 256 // station slices
28const PF_MAXPT: i64 = 4096 // section points held per station
29const PF_XBINS: i64 = 128 // x-histogram bins used to separate torso from limbs
30const PF_GAP: i64 = 2 // empty x-bins that separate two clusters
31const PF_MAXRUN: i64 = 8
32const PF_MAXPARTS: i64 = 8
33const PF_MAXK: i64 = 12 // control rings kept per part after factorisation
37const PF_OUTCAP: i64 = 1048576 // output text buffer
39const PF_PTORSO: i64 = 0
40const PF_PARM: i64 = 1
41const PF_PLEG: i64 = 2
42const PF_PHEAD: i64 = 4
44const PF_TORSO_LO: i64 = 430
45const PF_TORSO_HI: i64 = 908
49const PF_ARM_LO: i64 = 470
50const PF_ARM_HI: i64 = 838
51const PF_LEG_LO: i64 = 60
52const PF_LEG_HI: i64 = 452
53const PF_HEAD_LO: i64 = 852

functions

55func pf_hw(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: pf_provenance_runmain calls 1: sys_write
56func pf_pn(v: i64) -> i64
called by 1: pf_provenance_run calls 2: sys_mmapsys_write
65func pf_satoi(s: *u8) -> i64
called by 1: pf_provenance_run
70func pf_rdbits(b: *u8, o: i64) -> i64
73func pf_f32mul(b: *u8, o: i64, mul: i64) -> i64
called by 1: pf_provenance_run calls 1: pf_rdbits
86func pf_isqrt(v: i64) -> i64 { if v <= 0 { return 0 } var x: i64 = v; var y: i64 = (x+1)/2; while y < x { x = y; y = (x + v/x)/2 } return x }
called by 1: pf_fit_section
87func pf_wrap(d: i64) -> i64 { var x: i64 = d % 360; if x < 0 { x = x + 360 } return x }
called by 1: pf_fit_section
89func pf_sin_fill(t: *i64) -> i64
called by 1: pf_provenance_run
95func pf_putint(buf: *u8, pos: *i64, v: i64, sep: i64) -> i64
109func pf_puts(buf: *u8, pos: *i64, s: *u8) -> i64
133func pf_fit_section(px: *i64, pz: *i64, idx: *i64, cnt: i64, sinT: *i64, fit: *i64, rat: *i64, nb: i64) -> i64
223func pf_symmetrize(rat: *i64, nb: i64) -> i64
called by 1: pf_provenance_run calls 1: sys_mmap
244func pf_factorise(cY: *i64, cRA: *i64, cRB: *i64, cXC: *i64, cZC: *i64, base: i64, n: i64, K: i64, sel: *i64) -> i64
called by 1: pf_provenance_run
286func pf_emit_part(buf: *u8, pos: *i64, cY: *i64, cRA: *i64, cRB: *i64, cXC: *i64, cZC: *i64,
called by 1: pf_provenance_run calls 2: pf_putspf_putint
313func pf_landmark(cY: *i64, cR: *i64, base: i64, n: i64, lo: i64, hi: i64, kind: i64) -> i64
called by 1: pf_provenance_run
331func pf_provenance_run(argc: i64, argv: *i64) -> i64
798func main(argc: i64, argv: *i64) -> i64