step-examples/12-12-cross-product/Xp009.stp
Sources
- synthesized cross-product.
Description
The file begins with `EF BB BF` before the `ISO-10303-21;` token, lacks the trailing `END-ISO-10303-21;` marker, and in its DATA section contains a `B_SPLINE_SURFACE_WITH_KNOTS` whose v-knot vector decreases (knots not strictly ascending). Three layers (lexical / framing / geometric) are simultaneously broken.
Reproducer recipe
leading BOM bytes; valid header; one surface with v-knots `(0,0,0,0.4,0.3,1,1,1)`; no closing `END-ISO-10303-21;`.
Expected kernel behavior
Heal and accept, or reject with diagnostic: each invariant is addressed independently; encoding policy on BOM, framing-token policy, knot-vector validity. A kernel that rejects (fails fast) on BOM never gets to the knot defect; one that heals (accepts) BOM must then face it.
Expected validation
occt=reject/reject gmsh=reject ifc=reject
Byte assertions
bytes_starts_with(b"\xef\xbb\xbf")not_contains(b"\nEND-ISO-10303-21;")contains(b"(0.0,0.4,0.3,1.0)")
Tier-3 assertions
load != "ok"
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* Xp009 - Cross-product: UTF-8 BOM at file start, missing END-ISO-10303-21 3 * marker, and B-spline surface with descending v-knot vector. 4 * Builds on Le001 (BOM) + Lh002 (missing END marker) + Gn001 (knot order). 5 * Defect 1: BOM bytes EF BB BF precede the magic line (encoded literally 6 * below using the file's leading bytes - this comment sits AFTER them). 7 * Defect 2: file lacks the closing END-ISO-10303-21; line. 8 * Defect 3: v-knot vector decreases (not strictly ascending). */ 9HEADER; 10FILE_DESCRIPTION(('Xp009 cross-product','BOM x missing END x descending knots'),'2;1'); 11FILE_NAME('Xp009.stp','2026-04-26T00:00:00',(''),(''),'cad-research-suite','',''); 12FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 1 1 1 1 }')); 13ENDSEC; 14DATA; 15#1=APPLICATION_CONTEXT('automotive_design'); 16#2=APPLICATION_PROTOCOL_DEFINITION('international standard','automotive_design',2000,#1); 17/* Control net: 4x4 */ 18#10=CARTESIAN_POINT('',(0.0,0.0,0.0)); 19#11=CARTESIAN_POINT('',(1.0,0.0,0.0)); 20#12=CARTESIAN_POINT('',(2.0,0.0,0.0)); 21#13=CARTESIAN_POINT('',(3.0,0.0,0.0)); 22#14=CARTESIAN_POINT('',(0.0,1.0,0.0)); 23#15=CARTESIAN_POINT('',(1.0,1.0,1.0)); 24#16=CARTESIAN_POINT('',(2.0,1.0,1.0)); 25#17=CARTESIAN_POINT('',(3.0,1.0,0.0)); 26#18=CARTESIAN_POINT('',(0.0,2.0,0.0)); 27#19=CARTESIAN_POINT('',(1.0,2.0,1.0)); 28#20=CARTESIAN_POINT('',(2.0,2.0,1.0)); 29#21=CARTESIAN_POINT('',(3.0,2.0,0.0)); 30#22=CARTESIAN_POINT('',(0.0,3.0,0.0)); 31#23=CARTESIAN_POINT('',(1.0,3.0,0.0)); 32#24=CARTESIAN_POINT('',(2.0,3.0,0.0)); 33#25=CARTESIAN_POINT('',(3.0,3.0,0.0)); 34/* Defect 3: v-knot list (0.0, 0.4, 0.3, 1.0) - decreases between [1] and [2] */ 35#100=B_SPLINE_SURFACE_WITH_KNOTS('bad_knots',3,3, 36 ((#10,#11,#12,#13), 37 (#14,#15,#16,#17), 38 (#18,#19,#20,#21), 39 (#22,#23,#24,#25)), 40 .UNSPECIFIED.,.F.,.F.,.F., 41 (4,4),(4,4), 42 (0.0,1.0), 43 (0.0,0.4,0.3,1.0), 44 .UNSPECIFIED.); 45ENDSEC; 46/* Defect 2: no END-ISO-10303-21; below */