code wiki / (root) / nx_slice_pipeline.nx

nx_slice_pipeline.nx

buildroot/runtime/nx_slice_pipeline.nx

10767 B249 linesdepth 12pulls 29 transitivereach 31 importersview sourcekind librarytopic slice
docsdependenciesstructsconstsfunctions

about

nx_slice_pipeline.nx -- end-to-end mesh -> multi-layer G-code orchestrator. THE integration primitive that composes every P0-P3.2 building block: nx_mesh (input mesh) nx_bvh (spatial index for slice pruning) nx_slice_plane (per-Z plane intersection -> segments) nx_slice_contour (segments -> closed polygons) nx_polygon offset (inward shrink for perimeter loops) nx_infill (rectilinear fill, alternating per layer) nx_gcode_emit (G-code text emission) nx_machine_graph (printer kinematics) nx_material_profile (filament temperatures + speeds) nx_gcode_manifest (provenance header) For each Z layer from bed to top of mesh: 1. Plane-slice the mesh -> segment soup 2. Assemble segments -> closed polygon contours 3. For each contour: a. Emit perimeter loop (the contour itself; v1 = single perimeter, multi-perimeter via offset queued for v2) b. Generate infill segments (alternating direction per layer for grid pattern, mechanical isotropy) c. Emit infill segments as G1 print moves Per cardinal feedback-engineering-sciences-bits-up-3d-print-first: this primitive demonstrates the methodology by which ALL future engineering arcs will be orchestrated -- compose Tier-1 sovereign primitives bits-up into the applied workflow. First print target: simple Voron-cube-style calibration print on the Qidi X-Max 3, then iterate up to mini-Christus, then full Christus per NISHI_3D_PRINT_ROADMAP ยง6 calibration ladder. license_tier: ORIGINAL

dependencies 13 imports · 25 importers

nx_syscalls.nx nx_mesh.nx nx_mesh_print_check.nx nx_bvh.nx nx_polygon.nx nx_slice_plane.nx nx_slice_contour.nx nx_infill.nx nx_machine_graph.nx nx_material_profile.nx nx_slice_pipeline.nx nx_cad_exceed.nx nx_cad_page.nx nx_cad_prims2_test.nx nx_cad_test.nx nx_christus_integration_test.nx nx_csg_fillet_test.nx nx_csg_test.nx nx_csg_torus_test.nx nx_cube_to_gcode_test.nx nx_dcc_slice_probe.nx

diagram shows first 10 each side; +3 more imports, +15 more importers in the complete lists below.

imports: nx_syscalls.nxnx_mesh.nxnx_mesh_print_check.nxnx_bvh.nxnx_polygon.nxnx_slice_plane.nxnx_slice_contour.nxnx_infill.nxnx_machine_graph.nxnx_material_profile.nxnx_gcode_emit.nxnx_supports.nxnx_slice_auto_supports.nx

imported by: nx_cad_exceed.nxnx_cad_page.nxnx_cad_prims2_test.nxnx_cad_test.nxnx_christus_integration_test.nxnx_csg_fillet_test.nxnx_csg_test.nxnx_csg_torus_test.nxnx_cube_to_gcode_test.nxnx_dcc_slice_probe.nxnx_dcc_to_print_test.nxnx_klipper_gcode_validator_test.nxnx_mushroom_overhang_test.nxnx_print_e2e_test.nxnx_print_session.nxnx_slice_pipe_v2_real_test.nxnx_slice_pipe_v2_test.nxnx_slice_pipeline_test.nxnx_slicer_lib.nxnx_stl_to_gcode_real_test.nxnx_underridge_gcode_gate.nxnx_underridge_hook_gcode_gate.nxnx_underridge_hook_petg_gate.nxnx_underridge_master_gate.nxnx_vessel_gcode.nx

structs

none

consts

51const NX_SLICE_PIPE_Q14: i64 = 16384
55const NX_SLICE_PIPE_OK: i64 = 0
56const NX_SLICE_PIPE_ERR_NULL_INPUT: i64 = 1
57const NX_SLICE_PIPE_ERR_BAD_LAYER_H: i64 = 2
58const NX_SLICE_PIPE_ERR_NO_CONTOURS: i64 = 3
59const NX_SLICE_PIPE_ERR_EMIT_FAILED: i64 = 4

functions

68func nx_slice_pipe_one_layer(emitter: *NxGcodeEmitter,
147func nx_slice_pipe_run(emitter: *NxGcodeEmitter,
197func nx_slice_pipe_run_v2(emitter: *NxGcodeEmitter,