nx_step_nurbs.nx
buildroot/runtime/nx_step_nurbs.nx
about
nx_step_nurbs.nx -- RATIONAL B-SPLINE SURFACE evaluation from STEP (cadtwin P3a: the ROUND parts, exact).
OpenCascade exports cylinders/holes as complex-instance rational B-spline surfaces, degree (1,3): linear along
the axis x rational-CUBIC around -- weights (1,1/3,1/3,1) = an EXACT circle arc (NURBS circle). This organ
parses the complex instance (control net 2x4 + weights) and evaluates the rational Bezier in fixed point:
Bernstein Q12, weights Q20 (fx256 would corrupt 1/3 -> Q20 keeps radius error ~ppm), coords fx256 (1 unit =
3.90625 um). ENGINEERING-TWIN doctrine: dimensional truth first -- the gate measures roundness/radius/positions
against the file's own declared values, in integer-exact teeth where the math is exact (t=0, 1/2, 1) and
measured-um bounds where it rounds. Units: as1 declares SI_UNIT(.MILLI.,.METRE.) -> mm confirmed at runtime,
never assumed. license_tier: ORIGINAL
dependencies 1 imports · 3 importers
imports: nx_step_tess.nx
imported by: nx_step_nurbs_gate.nxnx_step_tess2.nxnx_step_write.nx
structs
| none |
consts
| 11 | const SN_MAGIC_1000000000000: i64 = 1000000000000 |
| 13 | const SN_Q12: i64 = 4096 |
| 14 | const SN_QW: i64 = 1048576 |
functions
| 17 | func sgn_find(buf: *u8, off: i64, len: i64, pat: *u8) -> i64 |
| 35 | func sgn_int(buf: *u8, p: i64, e: i64, out: *i64) -> i64 |
| 47 | func sgn_realq(buf: *u8, p: i64, e: i64, q: i64, out: *i64) -> i64 |
| 88 | func sgn_rdiv(num: i64, den: i64) -> i64 |
| 93 | func sgn_bern(t: i64, b: *i64) -> i64 |
| 107 | func sgn_parse_surface(nt: *i64, sidx: i64) -> i64 |
| 158 | func sgn_eval(nt: *i64, row: i64, t: i64, out3: *i64) -> i64 |
| 186 | func sgn_tess_face(nt: *i64, sidx: i64) -> i64 called by 2: cr_tess_partsgn_tessellate_all calls 5: sgn_parse_surfacesgn_evalm3_hdrm3_add_vertm3_add_tri |
| 237 | func sgn_tessellate_all(nt: *i64) -> i64 |
| 261 | func sgn_unit_mm(st: *i64) -> i64 |