code wiki / _hdl_build / nx_explodelab_meshgen.nx
nx_explodelab_meshgen.nx
buildroot/runtime/_hdl_build/nx_explodelab_meshgen.nx
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
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
structs
| none |
consts
| 12 | const K_MAGIC_4194304: i64 = 4194304 |
| 13 | const K_MAGIC_524288: i64 = 524288 |
| 14 | const K_MAGIC_8192: i64 = 8192 |
| 15 | const K_MAGIC_4096: i64 = 4096 |
| 16 | const K_MAGIC_1024: i64 = 1024 |
| 17 | const K_MAGIC_20480: i64 = 20480 |
functions
| 20 | func mg_term(b: *i64, v: i64) -> i64 |
| 31 | func mg_part(b: *i64, mesh: i64, kind: i64, cx3: *i64) -> i64 |
| 134 | func main() -> i64 |