step-examples/12-3b-wires/Twi156.stp
Sources
- synthesized — no external source cited
Description
The closing edge's LINE puts a direction entity in the slot that requires a vector, so the reader aborts before duplicate-edge reorder repair is reached
Reproducer recipe
Expected kernel behavior
Reject with a diagnostic naming entity #72: its LINE puts a DIRECTION (#70) where Part 21 requires a `#N` reference to a VECTOR, so the closing edge's curve cannot be built. Once that is fixed, the EDGE_LOOP still lists edge-curve #100 twice — once as ORIENTED_EDGE #110 (`.T.`) and again as #114 (`.F.`) — alongside edges #101-#103; a kernel must recognize that the same EDGE_CURVE reference appearing twice in one loop, even with opposite orientation flags, does not by itself make a 5-sided boundary and should be rejected or collapsed rather than treated as five independent sides.
Expected validation
occt=signal(11)/signal(11) gmsh=signal(11) ifc=schema_n/a
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes
1ISO-10303-21; 2/* Twi156 - ShapeFix_Wire.FixReorder duplicate-edge 3 * Defect: Wire contains the same edge twice with forward and reverse orientations. 4 * FixReorder treats each ORIENTED_EDGE independently, seeing them as two distinct 5 * entities even though they reference the same underlying EDGE_CURVE. When attempting 6 * to reorder edges to form a continuous wire, duplicate edges are treated as if they 7 * are different and remain out of sequence. (ShapeFix_Wire reorder logic; no check 8 * for duplicate edge references with opposite orientations in the EDGE_LOOP) */ 9HEADER; 10FILE_DESCRIPTION(('Twi156 test case','Wire with duplicate edge (forward and reverse)'),'2;1'); 11FILE_NAME('Twi156.stp','2026-06-15T00:00:00',(''),(''),'cad-research-suite','',''); 12FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 13ENDSEC; 14DATA; 15#1=APPLICATION_CONTEXT('automotive_design'); 16#2=APPLICATION_PROTOCOL_DEFINITION('international standard','automotive_design',2000,#1); 17#10=CARTESIAN_POINT('',(0.0,0.0,0.0)); 18#11=DIRECTION('',(0.0,0.0,1.0)); 19#12=DIRECTION('',(1.0,0.0,0.0)); 20#13=AXIS2_PLACEMENT_3D('',#10,#11,#12); 21#20=PLANE('',#13); 22/* Vertices: 4 corners of a unit square */ 23#30=CARTESIAN_POINT('',(0.0,0.0,0.0)); 24#31=VERTEX_POINT('',#30); 25#32=CARTESIAN_POINT('',(1.0,0.0,0.0)); 26#33=VERTEX_POINT('',#32); 27#34=CARTESIAN_POINT('',(1.0,1.0,0.0)); 28#35=VERTEX_POINT('',#34); 29#36=CARTESIAN_POINT('',(0.0,1.0,0.0)); 30#37=VERTEX_POINT('',#36); 31/* Four line curves: bottom, right, top, left */ 32#40=DIRECTION('',(1.0,0.0,0.0)); 33#41=VECTOR('',#40,1.0); 34#42=LINE('',#30,#41); 35#50=DIRECTION('',(0.0,1.0,0.0)); 36#51=VECTOR('',#50,1.0); 37#52=LINE('',#32,#51); 38#60=DIRECTION('',(-1.0,0.0,0.0)); 39#61=VECTOR('',#60,1.0); 40#62=LINE('',#34,#61); 41#70=DIRECTION('',(0.0,-1.0,0.0)); 42#71=VECTOR('',#70,1.0); 43#72=LINE('',#36,#70); 44/* Four edges */ 45#100=EDGE_CURVE('',#31,#33,#42,.T.); 46#101=EDGE_CURVE('',#33,#35,#52,.T.); 47#102=EDGE_CURVE('',#35,#37,#62,.T.); 48#103=EDGE_CURVE('',#37,#31,#72,.T.); 49/* EDGE_LOOP with duplicate: edge #100 appears twice (forward and reverse) */ 50/* This creates topological inconsistency: [e1, e2, e3, e4, e1_rev] */ 51#110=ORIENTED_EDGE('',*,*,#100,.T.); 52#111=ORIENTED_EDGE('',*,*,#101,.T.); 53#112=ORIENTED_EDGE('',*,*,#102,.T.); 54#113=ORIENTED_EDGE('',*,*,#103,.T.); 55/* Duplicate edge with reverse orientation - same edge curve #100 */ 56#114=ORIENTED_EDGE('',*,*,#100,.F.); 57#120=EDGE_LOOP('',(#110,#111,#112,#113,#114)); 58#121=FACE_OUTER_BOUND('',#120,.T.); 59#122=ADVANCED_FACE('',(#121),#20,.T.); 60/* Mandatory PRODUCT chain */ 61#9000=PRODUCT_CONTEXT('',#1,'mechanical'); 62#9001=PRODUCT('Twi156','Twi156','',(#9000)); 63#9002=PRODUCT_DEFINITION_FORMATION('','',#9001); 64#9003=PRODUCT_DEFINITION_CONTEXT('part definition',#1,'design'); 65#9004=PRODUCT_DEFINITION('','',#9002,#9003); 66#9005=PRODUCT_DEFINITION_SHAPE('','',#9004); 67#9006=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 68#9007=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 69#9008=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 70#9009=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9006,'distance_accuracy_value',''); 71#9010=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9009))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9006,#9007,#9008))REPRESENTATION_CONTEXT('','3D')); 72#9021=SHELL_BASED_SURFACE_MODEL('sbsm',(#9020)); 73#9020=CLOSED_SHELL('shell',(#122)); 74#9022=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#9021),#9010); 75#9023=SHAPE_DEFINITION_REPRESENTATION(#9005,#9022); 76ENDSEC; 77END-ISO-10303-21;