code wiki / _hdl_build / nx_explodelab_meshgen.nx

nx_explodelab_meshgen.nx

buildroot/runtime/_hdl_build/nx_explodelab_meshgen.nx

12863 B361 linesdepth 8pulls 18 transitivereach 0 importersview sourcekind tooltopic explodelab
docsdependenciesstructsconstsfunctions

about

nx_explodelab_meshgen.nx -- GENERATOR: bake the REAL 53/53 file-true part meshes into a compiled data module for the /explodelab viewer (build-generators-not-artifacts doctrine). Parses as1 -> per-part v2 tessellation (nx_cadtwin_report pipeline: attribution + planar/NURBS + weld) -> CENTERS each part at its own origin and scales fx256 -> world units (/8 = 32 units/mm; rod ±3200, plate ±2880 -- fits the viewer's existing ~3400 camera scale) -> emits runtime/nx_explodelab_meshes.nx: exm_load(e,kind,col) writing ex3_vert/ex3_tri (tri indices offset by the captured e[1] base), chunked <=200 emissions/function (compiler-safe), plus exm_counts(kind) and exm_dims(kind) = TRUE mm dims + thou (via nx_unitconv, baked). Display quantization: /8 truncation <= 31um -- labels carry the TRUE fx256 dims, the mesh is display-only. Kinds: 1 nut, 2 bolt, 3 rod, 4 plate, 5 l-bracket. expect_exit: 0 license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_cadtwin_report.nx nx_step_write.nx nx_explodelab_meshgen.nx

imports: nx_cadtwin_report.nxnx_step_write.nx

imported by: nobody (leaf or entry point)

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

main sp_read_file sys_openat_rd sys_read sys_close sp_scan sp_skip_string sp_skip_comment sp_statement sp_isspace sp_isnamec sp_args_span sp_skip_string ↻ cr_find_parts sp_name_is sgt_arg_ref sp_arg_span sp_skip_string ↻ sgt_refs sg_isdigit sp_find sp_pd_product sp_find ↻ sp_name_is ↻ sp_first_ref sp_skip_string ↻ sp_name_prefix sgt_refs ↻ ur_init sys_mmap ur_std ur_add ur_gcd ur_find ur_streq swb_init swb_s swb_c swb_c ↻ sp_prod_name_is

structs

none

consts

12const K_MAGIC_4194304: i64 = 4194304
13const K_MAGIC_524288: i64 = 524288
14const K_MAGIC_8192: i64 = 8192
15const K_MAGIC_4096: i64 = 4096
16const K_MAGIC_1024: i64 = 1024
17const K_MAGIC_20480: i64 = 20480

functions

20func mg_term(b: *i64, v: i64) -> i64
called by 1: mg_part calls 2: swb_nswb_s
31func mg_part(b: *i64, mesh: i64, kind: i64, cx3: *i64) -> i64
134func main() -> i64