code wiki / (root) / nx_cad_page.nx

nx_cad_page.nx

buildroot/runtime/nx_cad_page.nx

21489 B264 linesdepth 14pulls 43 transitivereach 0 importersview sourcekind tooltopic cad
docsdependenciesstructsconstsfunctions

about

nx_cad_page.nx -- EMIT the live nishifamily.com/cad page for Nishi CAD. Self-contained: imports the sovereign CAD/DCC organs, AUTHORS three real solids (parametric cylinder, parametric box, sculpted icosphere), bakes their actual geometry into the page, runs the model->print pipeline + the measured-exceed checks AT RENDER TIME, and renders an interactive zero-dependency 3D viewer (no WebGL, no libraries) plus the honest measured census. No HTML/JS number is typed by hand -- the organ computes them. Publish is the separate sovereign step nx_aw_push. license_tier: ORIGINAL genealogy_id: nishi_cad_live_page lineage_id: nx_cad_page_v1

dependencies 14 imports · 0 importers

nx_syscalls.nx nx_mesh.nx nx_mesh_edit.nx nx_mesh_sculpt.nx nx_cad.nx nx_sdf.nx nx_csg.nx nx_cad_exceed.nx nx_stl_write.nx nx_stl.nx nx_cad_page.nx

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

imports: nx_syscalls.nxnx_mesh.nxnx_mesh_edit.nxnx_mesh_sculpt.nxnx_cad.nxnx_sdf.nxnx_csg.nxnx_cad_exceed.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_now_realtime_sec sys_mmap sys_clock_gettime_real sys_mmap ↻ 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 nx_mesh_alloc sys_mmap ↻ nx_mesh_set_vertex nx_mesh_set_triangle nx_cad_make_box sys_mmap ↻ nx_cad_extrude ↻ nx_mesh_make_icosphere nx_mesh_make_octahedron nx_mesh_alloc ↻ nx_mesh_set_vertex ↻ nx_mesh_set_triangle ↻ nx_mesh_subdivide nx_mesh_alloc ↻ nx_mesh_set_vertex ↻ nx_mesh_get_vertex_x nx_mesh_get_vertex_y nx_mesh_get_vertex_z nx_mesh_get_color nx_mesh_set_triangle ↻ nx_mesh_project_to_sphere nx_isqrt nx_mesh_sculpt_brush nx_isqrt ↻ nx_csg_box_minus_cyl nx_sdf_make

structs

none

consts

27const CAD_MAGIC_163840: i64 = 163840
28const CAD_MAGIC_327680: i64 = 327680
29const CAD_MAGIC_245760: i64 = 245760
30const CAD_MAGIC_81920: i64 = 81920
31const CAD_MAGIC_49152: i64 = 49152
32const CAD_MAGIC_98304: i64 = 98304
33const CAD_MAGIC_65536: i64 = 65536
34const CAD_MAGIC_3277: i64 = 3277
35const CAD_MAGIC_6554: i64 = 6554
36const CAD_MAGIC_4194304: i64 = 4194304
38const CAD_OUT: *u8 = "web_assets/cad.html"
39const CAD_CAP: i64 = 2097152

functions

41func cat(dst: *u8, off: i64, s: *u8) -> i64
47func catn(dst: *u8, off: i64, v: i64) -> i64
called by 2: emit_mesh_jsmain calls 1: sys_mmap
60func emit_mesh_js(h: *u8, off: i64, m: *NxMesh, name: *u8) -> i64
84func smoke_count(buf: *u8, len: i64, needle: *u8) -> i64
called by 1: main
97func emit_grade(h: *u8, off: i64, ok: i64) -> i64
called by 1: main calls 1: cat
104func main() -> i64