code wiki / (root) / nx_step_brepw.nx

nx_step_brepw.nx

buildroot/runtime/nx_step_brepw.nx

15421 B414 linesdepth 7pulls 9 transitivereach 1 importersview sourcekind librarytopic step
docsdependenciesstructsconstsfunctions

about

nx_step_brepw.nx -- ANALYTIC B-REP STEP WRITE (cadtwin P3a write parity): two capabilities. (A) sw2_box AUTHORS a true analytic B-rep from parameters: 8 VERTEX_POINTs, 12 EDGE_CURVEs on LINEs, 24 ORIENTED_EDGEs, 6 ADVANCED_FACEs on PLANEs (AXIS2 origin/normal/refdir), MANIFOLD_SOLID_BREP + product chain + DECLARED mm units -- generated numerically, not copied. Verified by reading it back through the full gated v2 pipeline (planar tessellation, exact invariants, exact dimensions). (B) sw2_reemit RE-SERIALIZES any parsed model's reachable B-rep graph (BFS from every SDR/NAUO/CDSR seed) with renumbered ids -- entity args copied span-wise with refs REWRITTEN (strings skipped), complex instances preserved. = persistence for anything we can read (planes, degree-5 splines, rational Bezier surfaces/curves). Verified: re-parse -> full planar+NURBS tessellation == the original model's (face counts + order-invariant geometry checksum). Uses swb_* from nx_step_write ('#' emitted as byte 35 -- literal gotcha). license_tier: ORIGINAL

dependencies 1 imports · 1 importers

nx_step_write.nx nx_step_brepw.nx nx_step_brepw_gate.nx

imports: nx_step_write.nx

imported by: nx_step_brepw_gate.nx

structs

none

consts

13const K_MAGIC_262144: i64 = 262144
14const K_MAGIC_16384: i64 = 16384
15const K_MAGIC_131072: i64 = 131072
16const K_MAGIC_65536: i64 = 65536
17const K_MAGIC_2048: i64 = 2048
18const K_MAGIC_4194304: i64 = 4194304

functions

21func sw2_prelude(b: *i64, pname: *u8) -> i64
called by 1: sw2_box calls 4: swb_sswb_cswb_entswb_ref
102func sw2_pt(b: *i64, id: i64, x: i64, y: i64, z: i64) -> i64
called by 1: sw2_box calls 4: swb_entswb_sswb_fxswb_c
114func sw2_oe(b: *i64, id: i64, ecid: i64, fwd: i64) -> i64
called by 1: sw2_box calls 3: swb_entswb_sswb_ref
126func sw2_box(path: *u8, w: i64, h: i64, d: i64, pname: *u8) -> i64
296func sw2_copy_args(st: *i64, eidx: i64, b: *i64, map: *i64) -> i64
333func sw2_reemit(st: *i64, path: *u8) -> i64