code wiki / (root) / nx_auto_supports_v2_target_test.nx

nx_auto_supports_v2_target_test.nx

buildroot/runtime/nx_auto_supports_v2_target_test.nx

5243 B126 linesdepth 12pulls 27 transitivereach 0 importersview sourcekind gate/prooftopic auto
docsdependenciesstructsconstsfunctions

about

nx_auto_supports_v2_target_test.nx -- four-pillar MONITOR for the auto-supports mushroom miss surfaced by Phase B2.1 (commit prior). This test EXPECTS the bug -- it will FAIL loudly when the v2 fix lands, signalling to update assertions. The bug: nx_slice_pipe_build_supports does NOT detect overhangs on a clean mushroom shape (column 4x4 + cap 10x10 with 3mm shoulder). Empirically: - Direct call to nx_supports_layer_overhang with the column polygon and cap polygon DOES detect overhang vertices (verified by background diagnostic, exit 0) - So the primitive math works. The bug is in the slicer integration: contour-build at z=20.0 coplanar slice, or contour pairing by index at the transition layer, or layer indexing skipping the mushroom shoulder. V2 fix queued (not in this commit): - Contour-centroid tracking for matching across layers - Cumulative-printed-region check (vertex outside any prev layer's contour => overhang) - Handle abrupt shape change (single-vs-multi-contour transitions) When v2 ships, this smoke's expected verdict flips from "v1 misses (plan.n == 0)" to "v2 detects (plan.n > 0)". The body literally says `expect plan.n == 0` -- which means the test FAILS LOUD if v2 ships without updating this smoke. That's the MONITOR pillar. expect_exit: 0 (current: v1 returns plan.n=0; expect that) license_tier: ORIGINAL

dependencies 7 imports · 0 importers

nx_syscalls.nx nx_mesh.nx nx_bvh.nx nx_machine_graph.nx nx_material_profile.nx nx_supports.nx nx_slice_auto_supports.nx nx_auto_supports_v2_target_tes

imports: nx_syscalls.nxnx_mesh.nxnx_bvh.nxnx_machine_graph.nxnx_material_profile.nxnx_supports.nxnx_slice_auto_supports.nx

imported by: nobody (leaf or entry point)

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

main nx_material_profile_generi nx_material_profile_alloc sys_mmap build_mushroom nx_mesh_alloc sys_mmap ↻ nx_mesh_set_vertex nx_mesh_set_triangle nx_bvh_build nx_bvh_build_with_threshol sys_mmap ↻ nx_bvh_compute_tri_info nx_mesh_print_tri_v nx_mesh_get_vertex_x nx_mesh_get_vertex_y nx_mesh_get_vertex_z nx_bvh_tri_at nx_bvh_min3 nx_bvh_max3 nx_bvh_build_subtree nx_bvh_alloc_node nx_bvh_fill_subtree nx_bvh_node_at nx_bvh_range_aabb nx_bvh_tri_at ↻ nx_bvh_longest_axis nx_bvh_partition_by_axis nx_bvh_centroid_on_axis nx_bvh_swap_tri_order nx_bvh_alloc_node ↻ nx_bvh_fill_subtree ↻ nx_slice_pipe_build_suppor nx_mesh_bbox_compute sys_mmap ↻ nx_mesh_get_vertex_x ↻ nx_mesh_get_vertex_y ↻ nx_mesh_get_vertex_z ↻ nx_support_plan_new sys_mmap ↻

structs

none

consts

41const Q14: i64 = 16384

functions

43func build_mushroom() -> *NxMesh
94func main() -> i64