code wiki / (root) / nx_build_plan.nx

nx_build_plan.nx

buildroot/runtime/nx_build_plan.nx

9482 B241 linesdepth 3pulls 3 transitivereach 3 importersview sourcekind librarytopic build
docsdependenciesstructsconstsfunctions

about

nx_build_plan.nx -- multi-part / multi-printer / multi-process schedule solver. ===================================================================== SUPERIOR CAPABILITY (per the 2026-05-20 cardinal): NO production additive-manufacturing system schedules across PROCESS CLASSES. Slicers are per-process (Orca/Bambu/Cura/Prusa FDM-only; Chitubox resin-only; Materialise metal-only). Multi-printer coordination today is humans + spreadsheets. This file ships the foundational primitive for cross-process build coordination: each part declares its process_class + estimated print time + post-cure time + dependencies on other parts. Solver outputs per-part start_time minimizing the dependency chain subject to per-process printer availability. Demo target (per [[NISHI_3D_PRINT_MULTI_PROCESS_ROADMAP_2026_05_20]]): 3-process Christus assembly -- FDM PLA body + DIW cement base + FDM metal sintered crown, robot pickup at T+max(all end-times). Before this primitive that schedule existed only on paper; now the substrate computes it. ===================================================================== license_tier: ORIGINAL

dependencies 2 imports · 3 importers

nx_syscalls.nx nx_print_process.nx nx_build_plan.nx nx_build_plan_sim.nx nx_build_plan_sim_test.nx nx_build_plan_test.nx

imports: nx_syscalls.nxnx_print_process.nx

imported by: nx_build_plan_sim.nxnx_build_plan_sim_test.nxnx_build_plan_test.nx

structs

45struct NxBuildPart
62struct NxBuildPlan

consts

32const NX_BUILD_OK: i64 = 0
33const NX_BUILD_ERR_BAD_INPUT: i64 = 1
34const NX_BUILD_ERR_CAPACITY: i64 = 2
35const NX_BUILD_ERR_CYCLE: i64 = 3
36const NX_BUILD_ERR_BAD_DEP: i64 = 4
58const NX_BUILD_PART_BYTES: i64 = 64 // 8 fields × 8
70const NX_BUILD_PLAN_BYTES: i64 = 40 // 5 fields × 8

functions

74func nx_build_plan_new(capacity: i64) -> *NxBuildPlan
called by 2: mainmain calls 1: sys_mmap
100func nx_build_plan_add_part(plan: *NxBuildPlan,
called by 2: mainmain calls 1: nx_process_is_valid
130func nx_build_part_set_dep(plan: *NxBuildPlan,
called by 1: main
160func nx_build_plan_solve(plan: *NxBuildPlan) -> i64
called by 2: mainmain