code wiki / (root) / nx_mesh_print_check_test.nx

nx_mesh_print_check_test.nx

buildroot/runtime/nx_mesh_print_check_test.nx

1912 B55 linesdepth 6pulls 6 transitivereach 0 importersview sourcekind gate/prooftopic mesh
docsdependenciesstructsconstsfunctions

about

nx_mesh_print_check_test.nx -- exercise bbox + manifold check on a synthetic tetrahedron and a deliberately broken mesh. Closed-form invariants: (a) Tetrahedron factory returns non-null mesh with 4 verts + 4 tris. (b) Bbox of unit tetrahedron = (0,0,0) to (EDGE,EDGE,EDGE). (c) Manifold check returns OK on the tetrahedron. (d) Manifold check returns NOT_MANIFOLD when one triangle is deleted (now 3 tris, three edges have no reverse partner). (e) Existing nx_mesh_validate still accepts the tetrahedron (no out-of-range indices). expect_exit: 0 license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_mesh.nx nx_mesh_print_check.nx nx_mesh_print_check_test.nx

imports: nx_mesh.nxnx_mesh_print_check.nx

imported by: nobody (leaf or entry point)

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

main nx_mesh_make_tetrahedron nx_mesh_alloc sys_mmap nx_mesh_set_vertex nx_mesh_set_triangle nx_mesh_bbox_compute sys_mmap ↻ nx_mesh_get_vertex_x nx_mesh_get_vertex_y nx_mesh_get_vertex_z nx_mesh_is_manifold nx_mesh_print_tri_v nx_mesh_print_dir_edge_cou nx_mesh_print_tri_v ↻ nx_mesh_validate

structs

none

consts

19const EDGE_Q14: i64 = 16384 // 1.0 in Q14

functions

21func main() -> i64