code wiki / (root) / nx_beauty_score.nx

nx_beauty_score.nx

buildroot/runtime/nx_beauty_score.nx

5806 B147 linesdepth 4pulls 4 transitivereach 3 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_beauty_score.nx -- S-class composite proportion scorer. Given a measurement bundle (flat-array of (axis_id, measured_px) pairs) and a built canon table, score how close each canon entry is matched and emit a composite verdict. Output: flat-array result layout (no struct pointer return — avoids nxc2 codegen bug). result[0] = composite_score_q10 (0..1024) result[1] = verdict_kind (NX_BEAUTY_*) result[2] = matched_count (number of canon entries whose axes were both measured) result[3] = perfect_count (entries scoring within tight tolerance) result[4] = phi_family_score_q10 (avg across phi-family entries only) result[5] = loomis_family_score_q10 result[6] = vitruvian_family_score_q10 result[7] = linear_family_score_q10 result[8 + i] = per-entry score_q10 for canon entry i (0..NX_CANON_ENTRY_COUNT-1)

dependencies 3 imports · 2 importers

nx_syscalls.nx nx_phi.nx nx_canon_proportions.nx nx_beauty_score.nx nx_anatomy_measure.nx nx_beauty_score_test.nx

imports: nx_syscalls.nxnx_phi.nxnx_canon_proportions.nx

imported by: nx_anatomy_measure.nxnx_beauty_score_test.nx

structs

none

consts

30const NX_BEAUTY_UNKNOWN: i64 = 0
31const NX_BEAUTY_S_CLASS: i64 = 1 // avg >= 819 (0.80)
32const NX_BEAUTY_A_CLASS: i64 = 2 // avg >= 614 (0.60)
33const NX_BEAUTY_B_CLASS: i64 = 3 // avg >= 410 (0.40)
34const NX_BEAUTY_OFF_CANON: i64 = 4 // avg < 410
37const NX_BEAUTY_THRESH_S: i64 = 819
38const NX_BEAUTY_THRESH_A: i64 = 614
39const NX_BEAUTY_THRESH_B: i64 = 410
42const NX_RES_COMPOSITE: i64 = 0
43const NX_RES_VERDICT: i64 = 1
44const NX_RES_MATCHED: i64 = 2
45const NX_RES_PERFECT: i64 = 3
46const NX_RES_PHI_AVG: i64 = 4
47const NX_RES_LOOMIS_AVG: i64 = 5
48const NX_RES_VITRUV_AVG: i64 = 6
49const NX_RES_LINEAR_AVG: i64 = 7
50const NX_RES_PER_ENTRY_BASE: i64 = 8
53const NX_MEAS_FIELDS: i64 = 2

functions

56func nx_meas_find(meas: *i64, count: i64, axis_id: i64) -> i64
called by 1: nx_score_entry
67func nx_score_entry(canon: *i64, idx: i64, meas: *i64, m_count: i64) -> i64
83func nx_beauty_score(canon: *i64, meas: *i64, m_count: i64, result: *i64) -> i64
called by 1: main calls 2: nx_score_entrynx_canon_get