code wiki / _hdl_build / nx_profile_fit_segments_t239.nx
nx_profile_fit_segments_t239.nx
buildroot/runtime/_hdl_build/nx_profile_fit_segments_t239.nx
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
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
structs
| none |
consts
| 16 | const PF_Q14: i64 = 16384 |
| 17 | const PF_BIG: i64 = 2000000000 |
| 18 | const PF_M8388607: i64 = 8388607 |
| 19 | const PF_M8388608: i64 = 8388608 |
| 20 | const PF_POSQ0: i64 = 4096 |
| 21 | const PF_TARGET: i64 = 200000 |
| 22 | const PF_MAGIC_40500: i64 = 40500 |
| 26 | const PF_NB: i64 = 48 |
| 27 | const PF_MAXST: i64 = 256 // station slices |
| 28 | const PF_MAXPT: i64 = 4096 // section points held per station |
| 29 | const PF_XBINS: i64 = 128 // x-histogram bins used to separate torso from limbs |
| 30 | const PF_GAP: i64 = 2 // empty x-bins that separate two clusters |
| 31 | const PF_MAXRUN: i64 = 8 |
| 32 | const PF_MAXPARTS: i64 = 8 |
| 33 | const PF_MAXK: i64 = 12 // control rings kept per part after factorisation |
| 37 | const PF_OUTCAP: i64 = 1048576 // output text buffer |
| 39 | const PF_PTORSO: i64 = 0 |
| 40 | const PF_PARM: i64 = 1 |
| 41 | const PF_PLEG: i64 = 2 |
| 42 | const PF_PHEAD: i64 = 4 |
| 44 | const PF_TORSO_LO: i64 = 430 |
| 45 | const PF_TORSO_HI: i64 = 908 |
| 49 | const PF_ARM_LO: i64 = 470 |
| 50 | const PF_ARM_HI: i64 = 838 |
| 51 | const PF_LEG_LO: i64 = 60 |
| 52 | const PF_LEG_HI: i64 = 452 |
| 53 | const PF_HEAD_LO: i64 = 852 |
functions
| 55 | func 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 } |
| 56 | func pf_pn(v: i64) -> i64 |
| 65 | func pf_satoi(s: *u8) -> i64 called by 1: main |
| 70 | func pf_rdbits(b: *u8, o: i64) -> i64 |
| 73 | func pf_f32mul(b: *u8, o: i64, mul: i64) -> i64 |
| 86 | func 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 |
| 87 | func pf_wrap(d: i64) -> i64 { var x: i64 = d % 360; if x < 0 { x = x + 360 } return x } called by 1: pf_fit_section |
| 89 | func pf_sin_fill(t: *i64) -> i64 called by 1: main |
| 95 | func pf_putint(buf: *u8, pos: *i64, v: i64, sep: i64) -> i64 |
| 109 | func pf_puts(buf: *u8, pos: *i64, s: *u8) -> i64 |
| 133 | func pf_fit_section(px: *i64, pz: *i64, idx: *i64, cnt: i64, sinT: *i64, fit: *i64, rat: *i64, nb: i64) -> i64 |
| 223 | func pf_symmetrize(rat: *i64, nb: i64) -> i64 |
| 244 | func pf_factorise(cY: *i64, cRA: *i64, cRB: *i64, cXC: *i64, cZC: *i64, base: i64, n: i64, K: i64, sel: *i64) -> i64 called by 1: main |
| 286 | func pf_emit_part(buf: *u8, pos: *i64, cY: *i64, cRA: *i64, cRB: *i64, cXC: *i64, cZC: *i64, |
| 313 | func pf_landmark(cY: *i64, cR: *i64, base: i64, n: i64, lo: i64, hi: i64, kind: i64) -> i64 called by 1: main |
| 331 | func main(argc: i64, argv: *i64) -> i64 |