code wiki / (root) / nx_cad_test.nx

nx_cad_test.nx

buildroot/runtime/nx_cad_test.nx

5963 B121 linesdepth 13pulls 39 transitivereach 0 importersview sourcekind gate/prooftopic cad
docsdependenciesstructsconstsfunctions

about

nx_cad_test.nx -- KAT gate for parametric sketch->extrude solid modeling. Closed-form invariants (vert/tri counts, validity, AABB) for box / triangular prism / faceted cylinder, watertight slicing of the solids, and a full CAD->print proof: a parametric cylinder -> STL -> existing QIDI slicer -> real G-code. Ties the AutoCAD-class tools into the same proven fabrication pipeline the DCC tools use. expect_exit: 0.

dependencies 13 imports · 0 importers

nx_syscalls.nx nx_mesh.nx nx_mesh_edit.nx nx_cad.nx nx_bvh.nx nx_slice_plane.nx nx_slice_contour.nx nx_stl_write.nx nx_stl.nx nx_machine_graph.nx nx_cad_test.nx

diagram shows first 10 each side; +3 more imports, +0 more importers in the complete lists below.

imports: nx_syscalls.nxnx_mesh.nxnx_mesh_edit.nxnx_cad.nxnx_bvh.nxnx_slice_plane.nxnx_slice_contour.nxnx_stl_write.nxnx_stl.nxnx_machine_graph.nxnx_material_profile.nxnx_gcode_emit.nxnx_slice_pipeline.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap w sys_write nx_cad_make_box sys_mmap ↻ nx_cad_extrude nx_mesh_alloc sys_mmap ↻ nx_mesh_set_vertex nx_mesh_set_triangle chk w ↻ eqi nx_mesh_validate nx_mesh_aabb nx_mesh_get_vertex_x nx_mesh_get_vertex_y nx_mesh_get_vertex_z nx_cad_extrude ↻ nx_cad_make_cylinder sys_mmap ↻ nx_cos_turn_q10 sys_mmap ↻ _nx_trig_reduce _nx_cos_q1_table nx_sin_turn_q10 nx_cos_turn_q10 ↻ nx_cad_extrude ↻ wn sys_mmap ↻ sys_write ↻ slice_open 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 ↻

structs

none

consts

none

functions

22func w(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 2: chkmain calls 1: sys_write
23func wn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
32func smoke_count(buf: *u8, len: i64, needle: *u8) -> i64
called by 1: main
44func chk(cond: i64, pass: *i64, fail: *i64, label: *u8) -> i64
called by 1: main calls 1: w
49func eqi(a: i64, b: i64) -> i64 { if a == b { return 1 } return 0 }
called by 1: main
51func slice_open(model: *NxMesh, plane_z: i64) -> i64
58func main() -> i64