nx_dcc_slice_watertight_gate.nx
buildroot/runtime/nx_dcc_slice_watertight_gate.nx
about
nx_dcc_slice_watertight_gate.nx -- REGRESSION GATE for the two slicer fixes that
let DCC-authored slanted/curved geometry print:
(1) canonical edge-intersection rounding in nx_slice_edge_at_z (shared edges
compute the IDENTICAL crossing point regardless of traversal direction),
(2) the BVH right-child-adjacency fix in nx_bvh_fill_subtree (every triangle
is visited EXACTLY once -- no duplicate, no orphan).
Both bugs manifested as non-closing contours on non-axis-aligned meshes. This
gate asserts WATERTIGHT slicing (closed contours, exact segment counts) on a
pyramid, octahedron, and icosphere -- the shapes that exposed the bugs. A
1-segment dup or a dropped face re-opens a contour and trips n_open. expect_exit: 0.
dependencies 7 imports · 0 importers
imports: nx_syscalls.nxnx_mesh.nxnx_mesh_edit.nxnx_mesh_sculpt.nxnx_bvh.nxnx_slice_plane.nxnx_slice_contour.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 20 | func w(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 21 | func wn(v: i64) -> i64 |
| 30 | func chk(cond: i64, pass: *i64, fail: *i64, label: *u8) -> i64 |
| 35 | func eqi(a: i64, b: i64) -> i64 { if a == b { return 1 } return 0 } called by 1: main |
| 38 | func slice_stats(model: *NxMesh, plane_z: i64, out3: *i64) -> i64 |
| 48 | func main() -> i64 |