code wiki / _hdl_build / nx_slicer_lib.nx

nx_slicer_lib.nx

buildroot/runtime/_hdl_build/nx_slicer_lib.nx

2723 B67 linesdepth 13pulls 34 transitivereach 2 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_slicer_lib.nx -- the sovereign STL->G-code slice core (no main). Composes the SHIPPED, GATE-PROVEN slicer stack (proven end-to-end by nx_stl_to_gcode_real_test): nx_stl_load_binary -> nx_gemit_new(machine, material) -> nx_gemit_preamble -> nx_slice_pipe_run_v2. This is the SOVEREIGN alternative to third-party OrcaSlicer / PrusaSlicer / Cura -- our own geometry -> toolpath -> G-code, offline, deterministic. license_tier: ORIGINAL

dependencies 7 imports · 2 importers

nx_syscalls.nx nx_mesh.nx nx_stl.nx nx_machine_graph.nx nx_material_profile.nx nx_gcode_emit.nx nx_slice_pipeline.nx nx_slicer_lib.nx nx_slicer.nx nx_slicer_gate.nx

imports: nx_syscalls.nxnx_mesh.nxnx_stl.nxnx_machine_graph.nxnx_material_profile.nxnx_gcode_emit.nxnx_slice_pipeline.nx

imported by: nx_slicer.nxnx_slicer_gate.nx

structs

none

consts

18const SL_LINE_W: i64 = 6554 // 0.4 mm line width (Q14-ish, matches E2E)
19const SL_GCODE_CAP: i64 = 4194304 // 4 MB emitter buffer

functions

21func sl_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
22func sl_cat(d: *u8, o: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { d[o] = s[i]; o = o + 1; i = i + 1 } return o }
called by 1: main
23func sl_catn(d: *u8, o: i64, v: i64) -> i64
called by 1: main calls 1: sys_mmap
34func sl_atoi(s: *u8) -> i64
called by 1: main
49func sl_slice_stl(stl: *u8, stl_len: i64, layer_h: i64, infill: i64,