step-examples/12-3b-wires/Twi141.stp
Sources
- synthesized — no external source cited
Description
ShapeFix_Wire.FixSelfIntersectingEdge close-loop iteration
Reproducer recipe
Expected kernel behavior
The first four edges already close a 10x10 square; a fifth edge then runs 0.05 units from the closure vertex (0,0,0) back along the +X axis, lying exactly on top of the first edge for its whole length. Treat the last-versus-first pair as a candidate like any other, detect the collinear overlap, and cut the stub away so the four-edge closed square is restored; the repair must terminate, so bound the number of re-detection passes and fail loudly with a diagnostic if the overlap survives them, rather than exhausting an iteration cap and returning silently. That stub's declared direction (1.0, 0.5, 0.0) also does not pass through its own end vertex (0.05,0,0), and must be rejected on that basis.
Notes
RUNTIME-VERIFIED 2026-08-08 — the recorded crash comes from this file's straight-line direction argument, which references a plain direction where the schema declares a vector carrying a magnitude; repairing that one reference makes the file load, so the titled condition is never reached. See BACKLOG (M).
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/* Twi141 - ShapeFix_Wire.FixSelfIntersectingEdge close-loop iteration 3 * Defect: ShapeFix_Wire.FixSelfIntersectingEdge close-loop iteration 4 */ 5HEADER; 6FILE_DESCRIPTION(('Twi141 test case','ShapeFix_Wire.FixSelfIntersectingEdge close-loop iteration'),'2;1'); 7FILE_NAME('Twi141.stp','2026-06-15T00:00:00',(''),(''),'cad-research-suite','',''); 8FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 1 1 1 1 }')); 9ENDSEC; 10DATA; 11#1=APPLICATION_CONTEXT('automotive_design'); 12#2=APPLICATION_PROTOCOL_DEFINITION('international standard','automotive_design',2000,#1); 13#10=CARTESIAN_POINT('',(0.0,0.0,0.0)); 14#11=DIRECTION('',(0.0,0.0,1.0)); 15#12=DIRECTION('',(1.0,0.0,0.0)); 16#13=AXIS2_PLACEMENT_3D('',#10,#11,#12); 17 18#20=PLANE('',#13); 19/* Wire forming near-closed loop with tiny self-intersecting tail */ 20#100=CARTESIAN_POINT('',(0.0,0.0,0.0)); 21#101=VERTEX_POINT('',#100); 22#102=CARTESIAN_POINT('',(10.0,0.0,0.0)); 23#103=VERTEX_POINT('',#102); 24#104=CARTESIAN_POINT('',(10.0,10.0,0.0)); 25#105=VERTEX_POINT('',#104); 26#106=CARTESIAN_POINT('',(0.0,10.0,0.0)); 27#107=VERTEX_POINT('',#106); 28 29/* Edge 0: (0,0) -> (10,0) */ 30#110=LINE('',#100,#12); 31#111=EDGE_CURVE('',#101,#103,#110,.T.); 32 33/* Edge 1: (10,0) -> (10,10) */ 34#115=DIRECTION('',(0.0,1.0,0.0)); 35#116=LINE('',#102,#115); 36#117=EDGE_CURVE('',#103,#105,#116,.T.); 37 38/* Edge 2: (10,10) -> (0,10) */ 39#120=DIRECTION('',(0.0,-1.0,0.0)); 40#121=LINE('',#104,#120); 41#122=EDGE_CURVE('',#105,#107,#121,.T.); 42 43/* Edge 3: (0,10) -> (0,0) - but with a tiny loop-back self-intersection tail near the endpoint */ 44#130=DIRECTION('',(0.0,-1.0,0.0)); 45#131=LINE('',#106,#130); 46#132=EDGE_CURVE('',#107,#101,#131,.T.); 47 48/* Edge 4: tiny self-intersecting edge causing near-closure problem */ 49#140=CARTESIAN_POINT('',(0.05,0.0,0.0)); 50#141=VERTEX_POINT('',#140); 51#142=DIRECTION('',(1.0,0.5,0.0)); 52#143=LINE('',#100,#142); 53#144=EDGE_CURVE('',#101,#141,#143,.T.); 54 55#150=ORIENTED_EDGE('',*,*,#111,.T.); 56#151=ORIENTED_EDGE('',*,*,#117,.T.); 57#152=ORIENTED_EDGE('',*,*,#122,.T.); 58#153=ORIENTED_EDGE('',*,*,#132,.T.); 59#154=ORIENTED_EDGE('',*,*,#144,.T.); 60#155=EDGE_LOOP('',(#150,#151,#152,#153,#154)); 61#156=FACE_OUTER_BOUND('',#155,.T.); 62#157=ADVANCED_FACE('',(#156),#20,.T.); 63#8000=OPEN_SHELL('',(#157)); 64 65/* PRODUCT CHAIN - Mandatory */ 66#9000=PRODUCT_CONTEXT('',#1,'mechanical'); 67#9001=PRODUCT('Twi141','Twi141','',(#9000)); 68#9002=PRODUCT_DEFINITION_FORMATION('','',#9001); 69#9003=PRODUCT_DEFINITION_CONTEXT('part definition',#1,'design'); 70#9004=PRODUCT_DEFINITION('','',#9002,#9003); 71#9005=PRODUCT_DEFINITION_SHAPE('','',#9004); 72#9006=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 73#9007=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 74#9008=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 75#9009=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9006,'distance_accuracy_value',''); 76#9010=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9009))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9006,#9007,#9008))REPRESENTATION_CONTEXT('','3D')); 77#9021=SHELL_BASED_SURFACE_MODEL('sbsm',(#8000)); 78#9022=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#9021),#9010); 79#9023=SHAPE_DEFINITION_REPRESENTATION(#9005,#9022); 80ENDSEC; 81END-ISO-10303-21;