code wiki / (root) / nx_adaptive_layer_test.nx

nx_adaptive_layer_test.nx

buildroot/runtime/nx_adaptive_layer_test.nx

5221 B99 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_adaptive_layer_test.nx -- prove multi-criteria adaptive layer height EXCEEDS Cura/Orca/Prusa's curvature-only heuristic. Closed-form invariants: (a) Zero score (no criterion fires) -> max layer height (b) Max score (all criteria saturated) -> min layer height (c) Single criterion at max + others zero -> partial reduction (d) Each criterion has DISTINCT impact magnitude (weighted, not equal): curvature > load > bridge > overhang (e) Out-of-range inputs clamp safely (f) Monotonicity: more curvature -> finer layer (smaller height); more load -> finer layer; bridge present -> finer; overhang proximity -> finer (g) EXCEED MEASUREMENT: 4-criterion (all max) layer < 1-criterion curvature-only (Cura-equivalent: load=bridge=overhang=0). Industry's single-criterion solver under-resolves regions where curvature is low BUT load/bridge/overhang is high. (h) Backwards compat: when load=bridge=overhang_prox=0, the result is the SAME as a hypothetical single-criterion solver weighted to (curvature_weight / total) * span expect_exit: 0 license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_adaptive_layer.nx nx_adaptive_layer_test.nx

imports: nx_syscalls.nxnx_adaptive_layer.nx

imported by: nobody (leaf or entry point)

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

main nx_adaptive_layer_height nx_adaptive_layer_score

structs

none

consts

28const Q14: i64 = 16384

functions

30func main() -> i64