nx_mesh_qem_gate.nx
buildroot/runtime/nx_mesh_qem_gate.nx
about
nx_mesh_qem_gate.nx -- MEASURED-EXCEED gate for QEM decimation vs uniform vertex clustering.
A cylinder (flat caps + curved wall = mixed flat/feature regions) is decimated to the SAME
triangle budget by both methods. QEM keeps the feature vertices (the cap rims at the extremes),
so its bounding box stays closer to the original; uniform clustering grid-snaps and shrinks it.
T1 both methods reduced the triangle count.
T2 QEM mesh valid (indices in range).
T3 MEASURED EXCEED: QEM bbox-error < clustering bbox-error at equal tri budget.
T4 NEVER-BRICK (#26).
expect_exit: 0 license_tier: ORIGINAL
dependencies 6 imports · 0 importers
imports: nx_syscalls.nxnx_mesh.nxnx_mesh_print_check.nxnx_cad.nxnx_mesh_decimate.nxnx_mesh_qem.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
| 27 | const M: i64 = 16384 |
functions
| 17 | 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 } |
| 18 | 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 } |
| 19 | func iabs(v: i64) -> i64 { if v<0 { return 0-v } return v } called by 1: bbox_err |
| 22 | func bbox_err(m: *NxMesh, ox0: i64, ox1: i64, oy0: i64, oy1: i64, oz0: i64, oz1: i64) -> i64 |
| 29 | func main() -> i64 |