nx_stl_to_gcode_real_test.nx
buildroot/runtime/nx_stl_to_gcode_real_test.nx
about
nx_stl_to_gcode_real_test.nx -- HARD REAL TEST end-to-end:
hand-constructed binary STL bytes -> nx_stl_load_binary ->
nx_slice_pipe_run_v2 -> G-code text with supports + perimeters.
Operator directive 2026-05-20: "lets get to some hard real testing"
Earlier hard real test (nx_slice_pipe_v2_real) used the in-memory
nx_mesh_make_tetrahedron helper -- already pre-converted Q14
vertices, no STL bytes touched. THIS test exercises the COMPLETE
real-byte path:
1. Hand-build binary STL byte stream for a 10mm tetrahedron
2. Pass raw bytes through nx_stl_load_binary (real parser, real
IEEE 754 float32 -> Q14 conversion via nx_fp32_bytes_to_q14)
3. Feed the parsed mesh into nx_slice_pipe_run_v2
4. Assert structural properties of emitted G-code
This proves: external-format bytes -> substrate slicer -> G-code,
the workflow an operator would actually use loading a Christus STL.
expect_exit: 0
license_tier: ORIGINAL
dependencies 7 imports · 0 importers
imports: nx_syscalls.nxnx_mesh.nxnx_stl.nxnx_machine_graph.nxnx_material_profile.nxnx_gcode_emit.nxnx_slice_pipeline.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
| 31 | const Q14: i64 = 16384 |
| 34 | const F32_ZERO: i64 = 0x00000000 // +0.0 |
| 35 | const F32_TEN: i64 = 0x41200000 // +10.0 (sign 0, exp 130, mant 0x200000) |
functions
| 38 | func put_f32(buf: *u8, off: i64, bits32: i64) -> i64 called by 1: put_tri |
| 48 | func put_tri(buf: *u8, off: i64, |
| 69 | func smoke_count(buf: *u8, len: i64, needle: *u8) -> i64 called by 1: main |
| 89 | func main() -> i64 |