code wiki / (root) / nx_step_tess2.nx

nx_step_tess2.nx

buildroot/runtime/nx_step_tess2.nx

31789 B787 linesdepth 6pulls 9 transitivereach 6 importersview sourcekind librarytopic step
docsdependenciesstructsconstsfunctions

about

nx_step_tess2.nx -- COMPLETE planar-face tessellation: B-SPLINE CURVE edges + HOLE BRIDGING (cadtwin P3a, the 13 missing faces). as1's loop edges are not just LINEs: the nut outline is a DEGREE-5 non-uniform B_SPLINE_CURVE_WITH_KNOTS, hole rims are 2-edge spline loops (chord-walk saw <3 verts -> the old 'degenerate' skips), and hole faces are multi-bound. This adds: (1) sgb_* = fixed-point COX-DE BOOR evaluator (any degree <=8, clamped non-uniform knots Q20, ctrl fx256; endpoint-clamped so eval(t0)==P0) -- curve edges are SAMPLED, not chorded; every edge's first sample is VERIFIED against the edge's own start vertex (invariant; mismatch -> counted + chord fallback, never silent); (2) sgt2_* = loop walk v2 (curve-sampled) + KEYHOLE BRIDGING (holes spliced into the outer loop via closest-pair bridges; bridge edges traverse both ways -> shoelace still equals outer minus holes EXACTLY, so the v1 ear==shoelace invariant keeps guarding). Additive: v1 paths and gates untouched. license_tier: ORIGINAL

dependencies 2 imports · 3 importers

nx_step_nurbs.nx nx_recon3d.nx nx_step_tess2.nx nx_cadtwin_report.nx nx_step_brepw_gate.nx nx_step_tess2_gate.nx

imports: nx_step_nurbs.nxnx_recon3d.nx

imported by: nx_cadtwin_report.nxnx_step_brepw_gate.nxnx_step_tess2_gate.nx

structs

none

consts

14const SGB_QK: i64 = 1048576 // knot/param scale (Q20)
15const SGB_QB: i64 = 16384 // basis scale (Q14)

functions

20func sgb_parse(st: *i64, idx: i64, bc: *i64, cpts: *i64, kn: *i64) -> i64
77func sgb_basis(kn: *i64, i: i64, t: i64, p: i64, N: *i64, scr: *i64) -> i64
called by 1: sgb_eval2
101func sgb_span(kn: *i64, nk: i64, p: i64, t: i64) -> i64
called by 1: sgb_eval2
112func sgb_eval2(bc: *i64, cpts: *i64, kn: *i64, t: i64, out3: *i64, scr: *i64) -> i64
142func sgc_parse(st: *i64, cidx: i64, cc: *i64) -> i64
166func sgc_rot90(cc: *i64, rel: *i64, out: *i64) -> i64
called by 1: sgc_arc
176func sgc_bis(cc: *i64, a: *i64, b: *i64, out: *i64) -> i64
called by 1: sgc_arc calls 1: r3_normalize
185func sgc_tri(cc: *i64, a: *i64, b: *i64) -> i64
called by 1: sgc_arc
193func sgc_arc(cc: *i64, ra: *i64, rb: *i64, vout: *i64, cap: i64, st8: *i64) -> i64
266func sgr_parse(st: *i64, cidx: i64, rc: *i64) -> i64
314func sgr_eval(rc: *i64, t: i64, out3: *i64, scr: *i64) -> i64
called by 1: sgt2_bez_edge calls 2: sgn_bernsgn_rdiv
338func sgt2_resolve_curve(st: *i64, ecidx: i64, out: *i64) -> i64
382func sgt2_bez_edge(t2: *i64, ecidx: i64, fwd: i64, vout: *i64, nv0: i64, vcap: i64) -> i64
447func sgt2_loop_verts(t2: *i64, loopid: i64, vout: *i64, vcap: i64) -> i64
594func sgt2_bridge(mv: *i64, nm: i64, hv: *i64, nh: i64, cap: i64) -> i64
called by 1: sgt2_face
635func sgt2_face(tt: *i64, t2: *i64, idx: i64, slab: *i64) -> i64
754func sgt2_tessellate(tt: *i64, t2: *i64, slab: *i64) -> i64
called by 2: mainmain calls 2: sp_name_issgt2_face