code wiki / _hdl_build / nx_fascia.nx
nx_fascia.nx
buildroot/runtime/_hdl_build/nx_fascia.nx
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
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
structs
| none |
consts
| 26 | const FS2_M8388607: i64 = 8388607 |
| 27 | const FS2_M8388608: i64 = 8388608 |
| 28 | const FS2_HDR: i64 = 16 |
| 29 | const FS2_LAYENT: i64 = 24 |
| 30 | const FS2_TRI: i64 = 84 |
| 31 | const FS2_LID: i64 = 4 |
| 32 | const FS2_BANDS: i64 = 24 |
| 33 | const FS2_MM: i64 = 1000 |
| 34 | const FS2_MODE: i64 = 420 |
| 35 | const FS2_MAXD: i64 = 40 |
| 36 | const FS2_DEFK: i64 = 900 |
| 37 | const FS2_DEFC: i64 = 260 |
| 38 | const FS2_DEFA: i64 = 900 |
| 39 | const FS2_STEPS: i64 = 40 |
| 40 | const FS2_SOFTK: i64 = 120 |
| 42 | const FS2_EXC: i64 = 20 |
| 43 | const FS2_SCR: i64 = 4096 |
functions
| 45 | func 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 |
| 50 | func fs2_pn(v: i64) -> i64 { nxi_out(v); return 0 } |
| 51 | func fs2_rd32(b: *u8, o: i64) -> i64 |
| 54 | func fs2_wr32(b: *u8, o: i64, v: i64) -> i64 called by 1: fs2_run |
| 58 | func fs2_f32mul(b: *u8, o: i64, mul: i64) -> i64 |
| 72 | func fs2_f32of(v: i64) -> i64 called by 1: fs2_run |
| 84 | func fs2_streq(a: *u8, b: *u8) -> i64 called by 1: main |
| 89 | func fs2_atoi(s: *u8) -> i64 called by 1: main |
| 99 | func fs2_soft(layer: i64) -> i64 |
| 106 | func fs2_run(inp: *u8, outp: *u8, accel: i64, K: i64, C: i64, steps: i64, out: *i64) -> i64 |
| 235 | func fs2_gate() -> i64 |
| 328 | func main(argc: i64, argv: *i64) -> i64 |