nx_step_write.nx
buildroot/runtime/nx_step_write.nx
about
nx_step_write.nx -- STEP WRITE (cadtwin P3a write half, first rung): emit a valid ISO-10303-21 file from a
twin mesh -- FACETED B-rep class (FACETED_BREP + CLOSED_SHELL + FACE/FACE_OUTER_BOUND/POLY_LOOP + shared
CARTESIAN_POINTs) with the full product-identity chain (PRODUCT->PDF->PD->PDS->SDR) and DECLARED mm units +
uncertainty (the anti-JPL doctrine: our files SAY their units). Coordinates are written as EXACT decimals:
fx256 -> "N.XXXXXXXX" (1/256 = 0.00390625 -> 8 fractional digits, lossless) so a round-trip through our own
reader is INTEGER-EXACT by construction. Includes the matching FACETED READ path (POLY_LOOP -> triangles) --
the interop pair in one organ. HONEST scope: faceted geometry write (the mesh-twin class); analytic/NURBS
B-rep WRITE = the named residual for full parity. NOTE: '#' cannot appear in NishiLang string literals
(scanner gotcha) -- every STEP ref emits byte 35 via swb_c. license_tier: ORIGINAL
dependencies 1 imports · 4 importers
imports: nx_step_nurbs.nx
imported by: nx_explodelab_bomdims.nxnx_explodelab_meshgen.nxnx_step_brepw.nxnx_step_write_gate.nx
structs
| none |
consts
| 11 | const K_MAGIC_390625: i64 = 390625 |
| 12 | const K_MAGIC_10000000: i64 = 10000000 |
| 13 | const K_MAGIC_262144: i64 = 262144 |
| 14 | const K_MAGIC_32768: i64 = 32768 |
| 15 | const K_MAGIC_4000: i64 = 4000 |
functions
| 18 | func swb_init(b: *i64, cap: i64) -> i64 |
| 24 | func swb_c(b: *i64, ch: i64) -> i64 |
| 31 | func swb_s(b: *i64, s: *u8) -> i64 |
| 39 | func swb_n(b: *i64, v0: i64) -> i64 |
| 50 | func swb_fx(b: *i64, v0: i64) -> i64 |
| 66 | func swb_ref(b: *i64, id: i64) -> i64 |
| 71 | func swb_ent(b: *i64, id: i64) -> i64 |
| 79 | func sw_write_mesh(mesh: i64, path: *u8, pname: *u8) -> i64 |
| 247 | func sw_read_faceted(st: *i64, mesh: i64) -> i64 |
| 291 | func sw_facet_tri(st: *i64, lidx: i64, mesh: i64, p3: *i64) -> i64 |