code wiki / (root) / nx_pcb_gerber.nx

nx_pcb_gerber.nx

buildroot/runtime/nx_pcb_gerber.nx

4501 B104 linesdepth 2pulls 2 transitivereach 5 importersview sourcekind librarytopic pcb
docsdependenciesstructsconstsfunctions

about

nx_pcb_gerber.nx -- SOVEREIGN PCB/EDA copper-layer emitter: a board copper-geometry model (apertures + flashes/pads + draws/traces, struct-free parallel arrays) -> a valid Gerber RS-274X file. This is the MANUFACTURABLE FAB SEAM of the Omniforge "chips" leg: the universal handoff every PCB fab accepts AND the input our own isolation-milling CAM will consume next. INTEGER-ONLY / NO-FLOAT by construction -- all coordinates are micrometers (um); Gerber format 4.6 in MM has 6 implied decimals, so a coordinate's format-units = um*1000 (pure integer, zero FP drift -- the determinism float EDA tools cannot match). Aperture sizes formatted as I.FFFFFF mm from integer um. Verified against the real RS-274X spec example in knowledge/fetched/of_ed_gerber.raw (%FSLAX..*% / %MOMM*% / %ADDnnC,d*% / D01 D02 D03 / M02). Mirrors the nx_cad / nx_stl_write organ idiom (reused by the gate, exactly like nx_cad_test). license_tier: ORIGINAL expect_exit: 0

dependencies 1 imports · 3 importers

nx_syscalls.nx nx_pcb_gerber.nx nx_pcb_cam.nx nx_pcb_drill.nx nx_pcb_gerber_gate.nx

imports: nx_syscalls.nx

imported by: nx_pcb_cam.nxnx_pcb_drill.nxnx_pcb_gerber_gate.nx

structs

none

consts

none

functions

15func g_puti(buf: *u8, len: *i64, v: i64) -> i64
27func g_puts(buf: *u8, len: *i64, s: *u8) -> i64
34func g_mm6(buf: *u8, len: *i64, um: i64) -> i64
50func g_xyd(buf: *u8, len: *i64, x_um: i64, y_um: i64, d: i64) -> i64
called by 2: gerber_emitexpect_xyd calls 2: g_putsg_puti
59func g_sel(buf: *u8, len: *i64, code: i64) -> i64
called by 1: gerber_emit calls 2: g_putsg_puti
65func g_apdef(buf: *u8, len: *i64, code: i64, kind: i64, d1_um: i64, d2_um: i64) -> i64
called by 1: gerber_emit calls 3: g_putsg_putig_mm6
75func gerber_emit(