code wiki / (root) / nx_pillar_physics.nx

nx_pillar_physics.nx

buildroot/runtime/nx_pillar_physics.nx

9593 B210 linesdepth 3pulls 5 transitivereach 42 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_pillar_physics.nx -- bits-up cantilever-moment + load-proportional pillar footprint sizing for FDM support generation. ===================================================================== EXCEED axis (research baseline) ===================================================================== As of 2026-05, NO production slicer sizes support pillars by load. All four major systems use CONSTANT pillar diameter: OrcaSlicer 2.3.2: `tree_support_branch_diameter` USER-SET CONSTANT Bambu Studio: `tree_support_branch_distance` USER-SET CONSTANT Cura 5.x: `support_tree_branch_diameter` USER-SET CONSTANT PrusaSlicer 2.7: `support_pillar_diameter` USER-SET CONSTANT Academic SOTA (Topology-Aware Support Generation, SIGGRAPH 2023) uses FEM stress analysis but is OFFLINE (minutes per model) and non-incremental. No production system does load-aware sizing at slice-time. This file ships a Q14 fixed-point load-proportional sizing primitive that runs in O(1) per overhang vertex. Industry uses constant diameter; we scale with computed moment. That is the EXCEED axis. v2.1 (active, this file): unit-exact bending mechanics via cube-root section modulus. For a square pillar of edge s under bending moment M, the maximum bending stress is σ = M × (s/2) / (s⁴/12) = 6M/s³. Setting σ ≤ σ_yield gives s ≥ ∛(6M / σ_yield). This is the textbook formula NO production slicer implements (none read material yield at slice-time). Ships bits-up via nx_icbrt + nx_icbrt_q14. v2.0 (sqrt-proportional, kept as nx_pillar_min_footprint_v20 for reference/benchmarking) was monotone but not unit-exact -- safe at the calibration anchor, less conservative at heavy loads. v2.1's cube-root scaling grows ~30% slower than v2.0's sqrt at the heavy end, matching real bending mechanics. ===================================================================== license_tier: ORIGINAL

dependencies 4 imports · 7 importers

nx_syscalls.nx nx_isqrt.nx nx_icbrt.nx nx_material_profile.nx nx_pillar_physics.nx nx_pillar_physics_test.nx nx_pillar_physics_v21_test.nx nx_print_exceed_compose_test.nx nx_slice_auto_supports.nx nx_slice_auto_supports_test.nx nx_supports.nx nx_supports_physics_test.nx

imports: nx_syscalls.nxnx_isqrt.nxnx_icbrt.nxnx_material_profile.nx

imported by: nx_pillar_physics_test.nxnx_pillar_physics_v21_test.nxnx_print_exceed_compose_test.nxnx_slice_auto_supports.nxnx_slice_auto_supports_test.nxnx_supports.nxnx_supports_physics_test.nx

structs

none

consts

46const NX_MAGIC_13743895348: i64 = 13743895348
47const NX_MAGIC_9223372036854775000: i64 = 9223372036854775000
61const NX_MAT_PILLAR_SAFETY_Q14: i64 = 196608 // 12.0 in Q14
62const NX_MAT_PILLAR_MIN_FOOT_Q14: i64 = 32768 // 2.0 mm in Q14
63const NX_MAT_PILLAR_MAX_FOOT_Q14: i64 = 131072 // 8.0 mm in Q14
65const NX_PILLAR_PHYS_Q14: i64 = 16384

functions

85func nx_cantilever_moment(mass_g_q14: i64, arm_mm_q14: i64) -> i64
127func nx_pillar_min_footprint(moment_q14: i64,
171func nx_pillar_min_footprint_v20(moment_q14: i64,
called by 1: main calls 1: nx_isqrt
202func nx_pillar_footprint_for_load(mass_g_q14: i64,