nx_mesh_decimate_gate.nx
buildroot/runtime/nx_mesh_decimate_gate.nx
about
nx_mesh_decimate_gate.nx -- GATE for mesh decimation (the R-exceed size rung). Decimates the
generated cleaner head and proves a MEASURED triangle reduction at preserved dimensions.
T1 MEASURED reduction: decimated tris <= half the original (>=2x), with the factor reported.
T2 dimensions preserved: decimated bbox within ~2 cells of the original (shape kept).
T3 decimated mesh valid (indices in range).
T4 decimated STL written + round-trips, and is much SMALLER on disk.
T5 NEVER-BRICK (#26).
Also reports the closed/no-boundary metric honestly (decimation is lossy; closure-preserving
decimation is a later rung). expect_exit: 0 license_tier: ORIGINAL
dependencies 9 imports · 0 importers
imports: nx_syscalls.nxnx_mesh.nxnx_mesh_print_check.nxnx_sdf.nxnx_csg_scene.nxnx_underridge_cleaner.nxnx_mesh_decimate.nxnx_stl_write.nxnx_stl.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
| 24 | const M: i64 = 16384 |
functions
| 20 | func gw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 21 | func gn(v: i64) -> i64 { let b: *u8=sys_mmap(28); var m: i64=v; if m<0{sys_write(1,"-\x00" as *u8,1);m=0-m} let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var i: i64=0; while i<k{b[i]=t[k-1-i];i=i+1} sys_write(1,b,k); return 0 } |
| 22 | func iabs(v: i64) -> i64 { if v<0 { return 0-v } return v } called by 1: main |
| 26 | func edge_has_partner(m: *NxMesh, a: i64, b: i64, self_tri: i64) -> i64 called by 1: closed_no_boundary |
| 42 | func closed_no_boundary(m: *NxMesh) -> i64 |
| 54 | func main() -> i64 |