code wiki / _hdl_build / nx_fascia.nx

nx_fascia.nx

buildroot/runtime/_hdl_build/nx_fascia.nx

18082 B359 linesdepth 3pulls 5 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_fascia.nx -- PIPELINE STAGE 3: FASCIA + FAT AS SOFT BODY, bridging muscle to skin. The industry pipeline is skeleton -> muscle -> fascia/fat -> skin, and an audit of our own stack found we had that pipeline's SHAPE and almost none of its PHYSICS: "fat" was a scalar knob attenuating how much muscle relief reached the skin. Nothing lagged, nothing settled, nothing was driven by the layer beneath. It also found that the solver had been built and gated months earlier and NEVER WIRED IN: runtime/ nx_softdyn.nx is a spring-damper soft body whose stability envelope is enforced BY CONSTRUCTION (past a damping threshold semi-implicit Euler inverts and amplifies velocity, so SD_CAPC/SD_CAPK make an unstable configuration impossible to REQUEST rather than merely discouraged). It shipped with no soft-tissue geometry to bind to. The layer emitter now emits muscle and fat layers, so this organ is the wiring. THE BINDING, and it is what makes this stage 3 rather than just re-running a solver: a LAYER-AWARE LATTICE. Solver points are seated on a coarse band lattice over the figure; every vertex is displaced by its band's point SCALED BY THE SOFTNESS OF ITS OWN LAYER. Bone scales to ZERO and does not move at all; muscle moves partly; skin and fat move fully. That is fascia doing its actual job -- transmitting motion from the rigid thing inside to the soft thing outside, with each layer lagging by its own amount. nx_fascia <in.nxmesh> <out.nxmesh> [accel] [K] [C] [steps] nx_fascia selftest license_tier: ORIGINAL expect_exit: 0 No hw writes (Rule 26).

dependencies 3 imports · 0 importers

nx_gate_verdict.nx nx_itoa_lib.nx nx_softdyn.nx nx_fascia.nx

imports: nx_gate_verdict.nxnx_itoa_lib.nxnx_softdyn.nx

imported by: nobody (leaf or entry point)

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

main fs2_streq fs2_gate gv_ctr sys_mmap gv_head gv_puts sys_write sd_alloc sys_mmap ↻ sd_seat sd_step sd_isqrt sd_deadsnap sd_abs sd_abs ↻ sd_disp_y gv_check gv_puts ↻ sd_energy fs2_soft sd_disp_y_q8 fs2_run sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close fs2_rd32 fs2_f32mul fs2_rd32 ↻ sd_alloc ↻ sd_seat ↻ sd_step ↻ sd_disp_y ↻ sd_abs ↻ sd_energy ↻ fs2_soft ↻ fs2_wr32

structs

none

consts

26const FS2_M8388607: i64 = 8388607
27const FS2_M8388608: i64 = 8388608
28const FS2_HDR: i64 = 16
29const FS2_LAYENT: i64 = 24
30const FS2_TRI: i64 = 84
31const FS2_LID: i64 = 4
32const FS2_BANDS: i64 = 24
33const FS2_MM: i64 = 1000
34const FS2_MODE: i64 = 420
35const FS2_MAXD: i64 = 40
36const FS2_DEFK: i64 = 900
37const FS2_DEFC: i64 = 260
38const FS2_DEFA: i64 = 900
39const FS2_STEPS: i64 = 40
40const FS2_SOFTK: i64 = 120
42const FS2_EXC: i64 = 20
43const FS2_SCR: i64 = 4096

functions

45func fs2_puts(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 1: main
50func fs2_pn(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
51func fs2_rd32(b: *u8, o: i64) -> i64
called by 2: fs2_f32mulfs2_run
54func fs2_wr32(b: *u8, o: i64, v: i64) -> i64
called by 1: fs2_run
58func fs2_f32mul(b: *u8, o: i64, mul: i64) -> i64
called by 1: fs2_run calls 1: fs2_rd32
72func fs2_f32of(v: i64) -> i64
called by 1: fs2_run
84func fs2_streq(a: *u8, b: *u8) -> i64
called by 1: main
89func fs2_atoi(s: *u8) -> i64
called by 1: main
99func fs2_soft(layer: i64) -> i64
called by 2: fs2_runfs2_gate
106func fs2_run(inp: *u8, outp: *u8, accel: i64, K: i64, C: i64, steps: i64, out: *i64) -> i64
235func fs2_gate() -> i64
328func main(argc: i64, argv: *i64) -> i64