nx_slice_pipeline_test.nx
buildroot/runtime/nx_slice_pipeline_test.nx
about
nx_slice_pipeline_test.nx -- INTEGRATION TEST of every P0-P3.2
primitive. Tetrahedron mesh -> bvh -> multi-layer slice ->
contour -> perimeter + infill -> full Klipper G-code.
Tetrahedron at unit-mm scale (Q14_ONE = 16384), layer_height
0.2mm = 3277 Q14. Z range 0..16384, so ~5 layers fit
(3277, 6554, 9831, 13108, 16385/clip).
Each layer's slice is a smaller right triangle (top of tetrahedron
shrinks toward apex). The pipeline produces:
- preamble (M104/M140/etc)
- per-layer: ;LAYER:N + M106 + G0/G1 travel + G1 extrude perimeter
+ G0/G1 infill segments
- postamble (M104 S0 + M84)
Closed-form invariants:
(a) Pipeline returns positive layer count (>= 4 layers).
(b) Final emitter buffer > 1000 bytes (enough for preamble +
layers + postamble).
(c) Output contains preamble markers (M104 S215, G28, M109).
(d) Output contains per-layer markers (";LAYER:0", ";LAYER:1").
(e) Output contains perimeter print moves (G1 X with E value).
(f) Output contains postamble markers (M104 S0, M84).
(g) E_acc grew during printing (filament actually extruded).
expect_exit: 0
license_tier: ORIGINAL
dependencies 8 imports · 0 importers
imports: nx_syscalls.nxnx_mesh.nxnx_mesh_print_check.nxnx_bvh.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
| 38 | const Q14: i64 = 16384 |
functions
| 40 | func smoke_contains(buf: *u8, len: i64, needle: *u8) -> i64 called by 1: main |
| 59 | func main() -> i64 |