nx_step_tess.nx
buildroot/runtime/nx_step_tess.nx
about
nx_step_tess.nx -- PLANAR-FACE TESSELLATION from STEP B-rep (cadtwin P3a geometry half): turn the file's
actual topology into real triangles. Walk ADVANCED_FACE -> bound -> EDGE_LOOP -> ORIENTED_EDGE (.T. start /
.F. end vertex) -> EDGE_CURVE -> VERTEX_POINT -> CARTESIAN_POINT; project the loop onto the PLANE's 2D basis
(origin/normal/refdir from AXIS2_PLACEMENT_3D); EAR-CLIP the polygon (integer 2D cross products -- correct for
CONCAVE faces like the L-bracket, where a naive fan is wrong); emit triangles into mesh3. SELF-CHECK invariant:
the signed ear areas must sum EXACTLY to the polygon shoelace area (same integer coords) -- any ear-clip bug
shows as a mismatch count, not silent bad geometry. HONEST scope v1: single-bound planar faces; multi-bound
(holes/rims), curved surfaces (cylinder/B-spline) counted+skipped; curved EDGES on planar faces become chords
(counted). Composes nx_step_geom (STEP reals) + nx_mesh3. license_tier: ORIGINAL
dependencies 2 imports · 2 importers
imports: nx_step_geom.nxnx_mesh3.nx
imported by: nx_step_nurbs.nxnx_step_tess_gate.nx
structs
| none |
consts
| none |
functions
| 19 | func sgt_refs(buf: *u8, off: i64, len: i64, out: *i64, cap: i64) -> i64 called by 14: cr_find_partscr_tess_partsw2_reemitsgn_parse_surfacesgt_arg_refsgt_loop_verts+8 calls 1: sg_isdigit |
| 39 | func sgt_arg_ref(st: *i64, idx: i64, k: i64, out2: *i64) -> i64 called by 12: cr_find_partscr_tess_partsgn_tessellate_allsgt_face_planesgt_loop_vertssgt_face+6 calls 2: sp_arg_spansgt_refs |
| 48 | func sgt_flag_T(st: *i64, idx: i64, k: i64, out2: *i64) -> i64 |
| 61 | func sgt_tuple_of(st: *i64, id: i64, out3: *i64) -> i64 called by 8: sgn_parse_surfacesgt_face_planesgt_loop_vertssgb_parsesgc_parsesgr_parse+2 calls 2: sp_findsg_point_tuple |
| 68 | func sgt_face_plane(tt: *i64, idx: i64) -> i64 |
| 99 | func sgt_loop_verts(tt: *i64, loopid: i64) -> i64 |
| 150 | func sgt_project(tt: *i64, n: i64) -> i64 |
| 169 | func sgt_shoelace(p2: *i64, n: i64) -> i64 |
| 181 | func sgt_cross3(p2: *i64, a: i64, b: i64, c: i64) -> i64 |
| 189 | func sgt_inside(p2: *i64, tri3: *i64, p: i64) -> i64 |
| 201 | func sgt_earclip(tt: *i64, n: i64, vbase: i64) -> i64 |
| 275 | func sgt_face(tt: *i64, idx: i64) -> i64 called by 2: sgt_tessellatemain calls 11: sgt_face_planesp_arg_spansgt_refssp_findsgt_arg_refsgt_loop_verts+5 |
| 339 | func sgt_tessellate(tt: *i64) -> i64 |