nx_beauty_score.nx
buildroot/runtime/nx_beauty_score.nx
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
imports: nx_syscalls.nxnx_phi.nxnx_canon_proportions.nx
imported by: nx_anatomy_measure.nxnx_beauty_score_test.nx
structs
| none |
consts
| 30 | const NX_BEAUTY_UNKNOWN: i64 = 0 |
| 31 | const NX_BEAUTY_S_CLASS: i64 = 1 // avg >= 819 (0.80) |
| 32 | const NX_BEAUTY_A_CLASS: i64 = 2 // avg >= 614 (0.60) |
| 33 | const NX_BEAUTY_B_CLASS: i64 = 3 // avg >= 410 (0.40) |
| 34 | const NX_BEAUTY_OFF_CANON: i64 = 4 // avg < 410 |
| 37 | const NX_BEAUTY_THRESH_S: i64 = 819 |
| 38 | const NX_BEAUTY_THRESH_A: i64 = 614 |
| 39 | const NX_BEAUTY_THRESH_B: i64 = 410 |
| 42 | const NX_RES_COMPOSITE: i64 = 0 |
| 43 | const NX_RES_VERDICT: i64 = 1 |
| 44 | const NX_RES_MATCHED: i64 = 2 |
| 45 | const NX_RES_PERFECT: i64 = 3 |
| 46 | const NX_RES_PHI_AVG: i64 = 4 |
| 47 | const NX_RES_LOOMIS_AVG: i64 = 5 |
| 48 | const NX_RES_VITRUV_AVG: i64 = 6 |
| 49 | const NX_RES_LINEAR_AVG: i64 = 7 |
| 50 | const NX_RES_PER_ENTRY_BASE: i64 = 8 |
| 53 | const NX_MEAS_FIELDS: i64 = 2 |
functions
| 56 | func nx_meas_find(meas: *i64, count: i64, axis_id: i64) -> i64 called by 1: nx_score_entry |
| 67 | func nx_score_entry(canon: *i64, idx: i64, meas: *i64, m_count: i64) -> i64 |
| 83 | func nx_beauty_score(canon: *i64, meas: *i64, m_count: i64, result: *i64) -> i64 |