M198 — Triangle-strip index list repeats a vertex within one triple; the reader silently excludes the collapsed triangle instead of misreading or crashing on it

§12.8 (sub-class: tessellation)

P3 — cosmetic / metadata-only

crash

Sources

Description

Tessellated triangle geometry can be packed as a strip — a running list of vertex indices where each new index combines with the previous two to form one triangle — rather than as a flat list of independent triangles. When a strip's running window repeats a vertex, the candidate triangle it would form has zero area. The reader detects this collapse and leaves that one triangle out of the built mesh entirely, while the rest of the strip continues to build normally.

Reproducer recipe

`COMPLEX_TRIANGULATED_FACE` (the strip/fan-capable tessellated-face variant, not the plain-list variant) over a four-node unit-square `COORDINATES_LIST`, with one `triangle_strips` entry `(1,2,3,3)` — a strip whose last two positions repeat vertex index 3.

Expected kernel behavior

detect and exclude the collapsed triangle from the built mesh, leaving the rest of the strip intact; never emit a zero-area triangle or leave an uninitialized triangle slot in its place.

Notes

Synonyms: "triangle strip repeats a vertex index", "collapsed strip triangle silently excluded", "degenerate triangle omitted from packed strip mesh", "tessellated strip skip guard". Live-verified by inspecting the built mesh directly: it carries exactly one triangle, the well-formed one from the strip's first three indices, with the collapsed second candidate cleanly absent rather than present with garbage data. Mirrors M005, a plain flat-list tessellated face (the wrong packing mode entirely) whose repeated-index triple reaches no such guard at all and instead crashes downstream from an undefined per-vertex normal; rebuilt here in the packed strip form so the skip guard genuinely has something to fire on. A triangle-fan encoding of the same idea was tried and rejected: the fan variant's array-sizing pass does not reapply the same skip check the fill pass uses, so a collapsed fan triangle leaves an uninitialized triangle slot behind rather than being cleanly excluded — the strip encoding avoids that confound.

Expected validation

occt=shape(1)/shape(1) gmsh=signal(11) ifc=schema_n/a

Byte assertions

Tier-3 assertions

Cross-references

M005

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* M198: COMPLEX_TRIANGULATED_FACE using STRIP index encoding (triangle_strips, not the plain triangle list) with one repeated-vertex-index triple; input: AP242 file whose tessellated face packs a single triangle_strip (1,2,3,3) over a 4-node unit-square COORDINATES_LIST; StepToTopoDS_TranslateFace.cxx's SetTriangles (StepToTopoDS_TranslateFace.cxx:181-198) walks the strip pairwise and checks each new vertex against BOTH of its two immediate predecessors in the strip array before building a triangle -- vertex index 3 repeats at strip positions 3 and 4, so the second candidate triangle (2,3,3) collapses (Value(4)==Value(3)) and is silently excluded from the built Poly_Triangulation, while the first candidate triangle (1,3,2) is unaffected and built normally; the matching CreatePolyTriangulation counting pass (StepToTopoDS_TranslateFace.cxx:341-356) reapplies the identical skip check when sizing the triangle array, so the allocated count matches what actually gets filled -- no uninitialized triangle slot, unlike triangle_fans (whose counting pass at line 361 does NOT reapply the skip guard, only Length()-2, making fans an unsafe choice for this mechanism); the plain triangle-list path (SetTriangles's aTrianStripsNum==0 branch) copies indices verbatim with no such guard at all -- mirrors M005 (a plain TRIANGULATED_FACE list, the wrong encoding mode entirely, whose repeated-index triple (3,3,4) reaches no skip guard and instead crashes via a downstream NaN normal); rebuilt here as COMPLEX_TRIANGULATED_FACE strip encoding so the skip guard genuinely fires; covers stp-tess-degenerate-triangles; synonyms: triangle strip repeated vertex index, degenerate triangle silently excluded, complex triangulated face strip skip guard, tessellated strip collapsed triangle omitted */
3HEADER;
4FILE_DESCRIPTION(('M198'),'2;1');
5FILE_NAME('M198.stp','2026-07-12T00:00:00',(''),(''),'cad-research-suite','','');
6FILE_SCHEMA(('AP242_MANAGED_MODEL_BASED_3D_ENGINEERING_MIM_LF { 1 0 10303 442 1 1 4 }'));
7ENDSEC;
8DATA;
9#9000=APPLICATION_CONTEXT('mechanical design');
10#1=COORDINATES_LIST('strip_coords',4,((0.,0.,0.),(1.,0.,0.),(1.,1.,0.),(0.,1.,0.)));
11#2=COMPLEX_TRIANGULATED_FACE('strip_repeated_index_face',#1,4,(),$,(),((1,2,3,3)),());
12#9050=PRODUCT_CONTEXT('',#9000,'mechanical');
13#9051=PRODUCT('M198','M198','',(#9050));
14#9052=PRODUCT_DEFINITION_FORMATION('','',#9051);
15#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design');
16#9054=PRODUCT_DEFINITION('','','',#9052,#9053);
17#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054);
18#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
19#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
20#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
21#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value','');
22#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D'));
23#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#2),#9060);
24#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061);
25ENDSEC;
26END-ISO-10303-21;