code wiki / _hdl_build / nx_meshthick_gate.nx

nx_meshthick_gate.nx

buildroot/runtime/_hdl_build/nx_meshthick_gate.nx

6087 B110 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_meshthick_gate.nx -- teeth for R5 wall-thickness (cadtwin P6a, the geometric half of underbuilt-part detection). T1 ray-triangle KAT (known hit distance + miss + parallel) = catches any fixed-point scale bug at the primitive. T2 solid plate through-thickness = 2*hz. T3 argmin face is the thin (z) direction. T4 solid cube uniform thickness > plate. T5 DATA-DRIVEN underbuilt classifier (threshold param, not hardcoded): plate flagged, cube OK, and neg-control threshold flips the verdict = tracks the number. T6 STL round-trip: measure thickness on a mesh loaded back from disk (real interchange). expect_exit: 0 license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_meshthick.nx nx_meshthick_gate.nx

imports: nx_meshthick.nx

imported by: nobody (leaf or entry point)

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

main mg_puts mtk_ray_tri mtk_fxmul mtk_abs mtk_fxdiv mg_putn mg_puts ↻ mg_near mg_tooth mg_puts ↻ m3_bytes m3_init m3_hdr m3_box m3_add_vert m3_hdr ↻ m3_vert m3_add_tri m3_hdr ↻ m3_tri mtk_min_thickness m3_hdr ↻ mtk_face_thickness mtk_face_normal m3_tri ↻ m3_vert ↻ mtk_isqrt mtk_centroid m3_tri ↻ m3_vert ↻ mtk_cast m3_hdr ↻ m3_tri ↻ m3_vert ↻ mtk_ray_tri ↻ mtk_face_normal ↻ mtk_abs ↻ mtk_is_underbuilt m3_write_stl

structs

none

consts

none

functions

10func mg_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 3: mg_putnmg_toothmain
11func mg_putn(v: i64) -> i64
called by 1: main calls 1: mg_puts
24func mg_tooth(name: *u8, pass: i64, fails: *i64) -> i64
called by 1: main calls 1: mg_puts
31func mg_near(a: i64, b: i64, tol: i64) -> i64 { var d: i64 = a - b; if d < 0 { d = 0 - d } if d <= tol { return 1 } return 0 }
called by 1: main
33func main() -> i64