nx_supports_v2_test.nx
buildroot/runtime/nx_supports_v2_test.nx
about
nx_supports_v2_test.nx -- verify NxSupportPlan dedup + per-layer
G-code emission for support pillars.
Closed-form invariants:
(a) plan_new returns plan with n=0 + correct capacity
(b) add_pillar at fresh XY returns 0 (added) + plan.n == 1
(c) add_pillar at identical XY returns 1 (merged) + plan.n unchanged
(d) merge extends top_z_q14 to max(old, new)
(e) add_pillar at proximity-close XY (within spacing) merges
(f) add_pillar at far XY adds new (plan.n == 2)
(g) emit_layer at z below all pillars' tops emits all
(h) emit_layer at z above all pillars' tops emits zero
(i) emit output contains ";SUPPORT_START" + ";SUPPORT_END" markers
(j) emit output contains "G1 X" perimeter moves
(k) capacity exhausted returns -1
expect_exit: 0
license_tier: ORIGINAL
dependencies 6 imports · 0 importers
imports: nx_syscalls.nxnx_polygon.nxnx_machine_graph.nxnx_material_profile.nxnx_gcode_emit.nxnx_supports.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
| 27 | const Q14: i64 = 16384 |
functions
| 29 | func smoke_contains(buf: *u8, len: i64, needle: *u8) -> i64 called by 1: main |
| 48 | func main() -> i64 |