code wiki / _hdl_build / nx_lipratio_gate.nx

nx_lipratio_gate.nx

buildroot/runtime/_hdl_build/nx_lipratio_gate.nx

18583 B301 linesdepth 5pulls 9 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_lipratio_gate.nx -- GATE for the buildable half of aesthetictwin rung AT4: lip vermilion heights and the upper-to-lower ratio, measured from the BLENDED SURFACE rather than from the part table. THE LOAD-BEARING TOOTH IS T4, AND IT IS THE RUNG'S DONE-RULE STATED AS AN EXPERIMENT. That rule says the axis must be "read from mesh landmarks and NOT from slider positions". Those two are indistinguishable on a healthy face -- both give a plausible number -- so the only way to tell them apart is to CHANGE THE GEOMETRY AND SEE WHICH ONE MOVES. T4 halves the lip parts' vertical radius and requires the measured ratio to change. The estate's existing nx_faceprofile_gate reads lip depth as p[10*6+2], a part-table field that halving ry does not touch at all, so it would sail through T4 unchanged -- which is precisely the defect this rung exists to close. T3 is the other half of the same idea from the opposite direction: the stomion this gate EXTRACTED from the surface must agree with the parameter that CARVED it, within a tolerance DERIVED from that carve's own radius plus the blend width rather than typed as a constant. Extraction and parameter are two independent routes to one landmark, so their agreement is a free audit and their disagreement would locate a real defect in whichever is wrong. T5 is the negative control and it is REACHABLE, not decorative: shrunk to a tenth, the face no longer intersects the midline band at all, every probe returns no-surface, and the measure must report UNMEASURED rather than a number. A measure that answered anyway would be reading its own parameters.

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_gatekit_lib.nx nx_faceanat.nx nx_lipratio_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_gatekit_lib.nxnx_faceanat.nx

imported by: nobody (leaf or entry point)

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

main gv_ctr 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 ↻ gv_head gv_puts sys_write ↻ sys_mmap ↻ faceanat_build sdf_clear_ops sdf_set_floor sdf_set_mtx_amp fa_tissue_z sdf_set_op fa_lip_prims sdf_set_prim sdf_set_kb sdf_set_mat sdf_set_rot it_cos4096 it_sin4096 it_sin4096 ↻ sdf_set_prim ↻ sdf_set_roll it_cos4096 ↻ it_sin4096 ↻ lg_pnum

structs

none

consts

26const LG_ASCII0: i64 = 48
27const LG_MINUS: i64 = 45
28const LG_NL: i64 = 10
29const LG_MOUTH_CARVE: i64 = 20
30const LG_LIP_UPPER: i64 = 10
31const LG_LIP_LOWER: i64 = 11
32const LG_HALF: i64 = 50
33const LG_TENTH: i64 = 10
34const LG_PART_CY: i64 = 1
35const LG_PART_RY: i64 = 4
36const LG_FIELDS: i64 = 6
37const LG_PCT: i64 = 100 // the morphs' neutral percent

functions

39func lg_pnum(tag: *u8, v: i64) -> i64
called by 1: main calls 3: sys_mmapsys_writegk_len
61func lg_abs(v: i64) -> i64 { if v < 0 { return 0 - v } return v }
called by 1: main
63func main(argc: i64, argv: *i64) -> i64