code wiki / (root) / nx_garment_gen.nx

nx_garment_gen.nx

buildroot/runtime/nx_garment_gen.nx

3898 B80 linesdepth 4pulls 6 transitivereach 0 importersview sourcekind tooltopic garment
docsdependenciesstructsconstsfunctions

about

nx_garment_gen.nx -- THE GARMENT MESH GENERATOR (2026-08-30): grows conforming garment shells for every id of the engine's garment table from the NPC asset's own body surface and appends them as one GARM section (see nx_garment_gen_lib.nx for the geometry, the units and the fabric-table sources). nx_garment_gen <in.nxa> <out.nxa> [thick_permil] thick_permil scales fabric thickness (1000 = as derived). 0 is the neg-control: REFUSED by name. EXIT: 0 written . 2 usage . 4 REFUSED (zero thickness) . 5 bad nxa . 6 REFUSED (an id selected no triangle) . 7 REFUSED (a buffer cap -- named, never silently truncated) . 9 io Prints one GARM line per kind (the receipt) and the section's word count; the gate re-derives the same numbers IN-PROCESS from the lib, so no parser of this output exists anywhere. license_tier: ORIGINAL. No hw writes (Rule 26).

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_nxa.nx nx_garment_gen_lib.nx nx_garment_gen.nx

imports: nx_syscalls.nxnx_nxa.nxnx_garment_gen_lib.nx

imported by: nobody (leaf or entry point)

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

main gmg_puts sys_write ggp_atoi 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 ↻ sys_map_file sys_openat_rd sys_lseek sys_close gmg_load nxa_find nxa_section_entry nxa_magic nxa_check2 nxa_tag4 gmg_puts ↻ sys_mmap ↻ gmg_abs gmg_max gmg_isqrt gmg_near_joint gmg_abs ↻ gmg_pn sys_mmap ↻ sys_write ↻ gmg_gen_all

structs

none

consts

17const GGP_EXIT_OK: i64 = 0
18const GGP_EXIT_USAGE: i64 = 2
19const GGP_EXIT_REFUSED: i64 = 4
20const GGP_EXIT_BADNXA: i64 = 5
21const GGP_EXIT_EMPTY: i64 = 6
22const GGP_EXIT_CAP: i64 = 7
23const GGP_EXIT_IO: i64 = 9

functions

25func ggp_atoi(s: *u8) -> i64
called by 1: main
41func main(argc: i64, argv: *i64) -> i64