nx_pillar_physics.nx
buildroot/runtime/nx_pillar_physics.nx
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
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
| 46 | const NX_MAGIC_13743895348: i64 = 13743895348 |
| 47 | const NX_MAGIC_9223372036854775000: i64 = 9223372036854775000 |
| 61 | const NX_MAT_PILLAR_SAFETY_Q14: i64 = 196608 // 12.0 in Q14 |
| 62 | const NX_MAT_PILLAR_MIN_FOOT_Q14: i64 = 32768 // 2.0 mm in Q14 |
| 63 | const NX_MAT_PILLAR_MAX_FOOT_Q14: i64 = 131072 // 8.0 mm in Q14 |
| 65 | const NX_PILLAR_PHYS_Q14: i64 = 16384 |
functions
| 85 | func nx_cantilever_moment(mass_g_q14: i64, arm_mm_q14: i64) -> i64 |
| 127 | func nx_pillar_min_footprint(moment_q14: i64, |
| 171 | func nx_pillar_min_footprint_v20(moment_q14: i64, |
| 202 | func nx_pillar_footprint_for_load(mass_g_q14: i64, called by 2: mainnx_support_plan_add_pillar_physics calls 2: nx_cantilever_momentnx_pillar_min_footprint |