code wiki / (root) / nx_preflight_test.nx

nx_preflight_test.nx

buildroot/runtime/nx_preflight_test.nx

4835 B101 linesdepth 7pulls 11 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_preflight_test.nx -- exercise preflight orchestrator with good + bad inputs across every failure class. Closed-form invariants: (a) Tetrahedron + Qidi X-Max 3 + Generic PLA + sane params -> SAFE. (b) n_checks_run == 4; n_failed == 0 on the safe case. (c) Non-manifold (3-tri mesh, removed one) -> UNSAFE / NOT_MANIFOLD. (d) Mesh 500mm cube (exceeds 325mm Qidi build) -> UNSAFE / MESH_TOO_LARGE. (e) Material with bad temp (mutate PLA to print 260°C) -> UNSAFE / BAD_THERMAL. (f) Slicer max_speed 1000 mm/s (Qidi max 600) at 0.4×0.2 line -> flow = 0.4 × 0.2 × 1000 = 80 mm³/s > machine 35 mm³/s -> UNSAFE / FLOW_EXCEEDED_MACHINE. (g) Slicer max_speed 200 at 0.4×0.2 -> flow 16 mm³/s; material max 15 -> UNSAFE / FLOW_EXCEEDED_MATERIAL. (h) Verdict name lookup non-NULL for every reason. expect_exit: 0 license_tier: ORIGINAL

dependencies 6 imports · 0 importers

nx_syscalls.nx nx_mesh.nx nx_mesh_print_check.nx nx_machine_graph.nx nx_material_profile.nx nx_preflight.nx nx_preflight_test.nx

imports: nx_syscalls.nxnx_mesh.nxnx_mesh_print_check.nxnx_machine_graph.nxnx_material_profile.nxnx_preflight.nx

imported by: nobody (leaf or entry point)

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

main nx_mesh_make_tetrahedron nx_mesh_alloc sys_mmap nx_mesh_set_vertex nx_mesh_set_triangle nx_machine_graph_qidi_xmax nx_machine_graph_alloc sys_mmap ↻ nx_material_profile_generi nx_material_profile_alloc sys_mmap ↻ nx_preflight_check sys_mmap ↻ nx_mesh_is_manifold nx_mesh_print_tri_v nx_mesh_print_dir_edge_cou nx_mesh_print_tri_v ↻ nx_mesh_fits_machine nx_mesh_bbox_compute sys_mmap ↻ nx_mesh_get_vertex_x nx_mesh_get_vertex_y nx_mesh_get_vertex_z nx_polymer_validate_profil nx_polymer_thermal_for sys_mmap ↻ nx_polytherm_set nx_polymer_thermal_validat nx_layer_envelope_check nx_flow_envelope_check nx_pfr_name

structs

none

consts

26const Q14: i64 = 16384

functions

28func main() -> i64