code wiki / (root) / nx_i2mesh.nx

nx_i2mesh.nx

buildroot/runtime/nx_i2mesh.nx

5925 B138 linesdepth 4pulls 5 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_i2mesh.nx -- sovereign IMAGE-to-MESH v0 (generator-path R3, operator: "z image be able to be ingested like an i2mesh"). NOT neural (TripoSR/LRM); the honest v0 = SILHOUETTE INFLATION: an image -> foreground MASK -> 2D chamfer distance transform (interior + exterior) -> a 3D field that balloons the silhouette (thickest at the medial axis, pinched to 0 at the edge) -> nx_meshgen surface-nets -> emitted mesh. Ingests ANY image the SAME way -- synthetic masks OR our own Z-Image/render foreground. Honest ceiling: single-view inflation (front-back symmetric, no hidden geometry) vs neural multi-view; a real spine to grow. ORIGINAL

dependencies 2 imports · 1 importers

nx_syscalls.nx nx_meshgen.nx nx_i2mesh.nx nx_i2mesh_gate.nx

imports: nx_syscalls.nxnx_meshgen.nx

imported by: nx_i2mesh_gate.nx

structs

none

consts

10const I2_MW: i64 = 96
11const I2_MH: i64 = 96
12const I2_LARGE: i64 = 1000000

functions

14func i2m_px(m: *u8, x: i64, y: i64) -> i64 { return m[y * I2_MW + x] as i64 }
15func i2m_set(m: *u8, x: i64, y: i64, v: i64) -> i64 { m[y * I2_MW + x] = v as u8; return 0 }
18func i2m_mask_circle(m: *u8) -> i64
called by 1: main calls 1: i2m_set
24func i2m_mask_square(m: *u8) -> i64
called by 1: main calls 1: i2m_set
30func i2m_mask_cross(m: *u8) -> i64
called by 1: main calls 1: i2m_set
49func i2m_mask_from_fb(m: *u8, fb: *i64, w: i64, h: i64) -> i64
called by 1: main calls 1: i2m_set
68func i2m_dt(mask: *u8, d: *i64, fg: i64) -> i64
called by 1: emit_i2m
105func i2m_fill_field(F: *i64, mask: *u8, din: *i64, dout: *i64) -> i64
called by 1: emit_i2m calls 2: mg_wcmg_fi