code wiki / _hdl_build / nx_slicer.nx

nx_slicer.nx

buildroot/runtime/_hdl_build/nx_slicer.nx

3383 B92 linesdepth 14pulls 35 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_slicer.nx -- sovereign STL -> G-code slicer (CLI / MCP organ). nx_slicer slice <stl-path> <gcode-out-path> [layer_h_um] [infill_pct] Reads a binary STL, slices it through the sovereign stack (nx_slicer_lib -> nx_stl + nx_gemit + nx_slice_pipe_run_v2 on the QIDI X-Max 3 machine profile + generic PLA), writes the G-code file, and emits a summary JSON. The sovereign alternative to third-party slicers -- our own geometry->toolpath. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gcode_emit.nx nx_slicer_lib.nx nx_slicer.nx

imports: nx_syscalls.nxnx_gcode_emit.nxnx_slicer_lib.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main slw sys_write sys_exit sl_atoi sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close sl_cat sys_write ↻ sl_slice_stl nx_stl_load_binary sys_mmap ↻ nx_stl_is_ascii nx_le_read_u32 nx_mesh_alloc sys_mmap ↻ nx_stl_next_pow2 nx_hash_new nx_fp32_bytes_to_q14 nx_fp32_bits_to_q14 nx_stl_intern_vertex nx_stl_pack_xyz nx_le_write_u64 nx_le_write_u32 nx_hash_fnv1a_bytes nx_hash_has nx_hash_probe nx_hash_fnv1a_i64 nx_hash_get nx_hash_probe ↻ nx_mesh_get_vertex_x nx_mesh_get_vertex_y nx_mesh_get_vertex_z nx_mesh_set_vertex nx_hash_put

structs

none

consts

14const SL_MAGIC_4096: i64 = 4096
16const SL_LH_DEFAULT: i64 = 3277 // 0.2 mm in the slicer's Q14 units
17const SL_Q_PER_MM: i64 = 16384

functions

19func slw(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 }
called by 1: main calls 1: sys_write
21func main(argc: i64, argv: *i64) -> i64