step-examples/12-3b-wires/Twi176.stp
Sources
- synthesized — no external source cited
Description
ShapeFix_Wire.FixIntersectingEdges concurrent-modification
Reproducer recipe
Expected kernel behavior
This six-edge closed contour crosses itself at several interior points among non-adjacent edges — edges 2 and 4, for instance, meet at (6.667, 6.667, 0), away from any vertex. Collect every crossing from the original wire before modifying anything and apply all the splits in one rebuild: splitting pairs one at a time while walking the same edge list invalidates the parameters of the crossings not yet handled and leaves some undetected. If instead detection is re-run from scratch after each rebuild, bound the number of rounds and fail loudly when crossings remain at the bound, rather than returning a wire that still self-intersects.
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Tier-3 assertions
shape_null == True
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes
1ISO-10303-21; 2/* Twi176: GEOMETRIC_CURVE_SET containing EDGE_LOOP with 6 edges on PLANE; PLANE: normal +Z, origin (0,0,0); figure-eight self-intersecting wire â 6 edges with two crossing points; vertices: A(0,5), B(10,0), C(5,10), D(10,5) (crossing 1 ~(7.5,2.5)), E(0,10), F(5,0); wire: AâB (crossing_edge_A), BâC, CâD (crossing_edge_B), DâE, EâF, FâA; crossing_edge_A and crossing_edge_B each cross another edge IS the defect; FixIntersectingEdges IS mechanism â splits first crossing, modifying edge list while outer loop iterates; stale iterator causes second crossing to reference wrong edge after concurrent modification; GEOMETRIC_CURVE_SET IS model entity â OCC yields empty; all EDGE_CURVEs ARE wired into EDGE_LOOP; never orphaned */ 3HEADER; 4FILE_DESCRIPTION(('Twi176'),'2;1'); 5FILE_NAME('Twi176.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','',''); 6FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 7ENDSEC; 8DATA; 9#9000=APPLICATION_CONTEXT('mechanical design'); 10#1=CARTESIAN_POINT('',(0.0,0.0,0.0)); 11#2=DIRECTION('',(0.0,0.0,1.0)); 12#3=DIRECTION('',(1.0,0.0,0.0)); 13#4=AXIS2_PLACEMENT_3D('',#1,#2,#3); 14#5=PLANE('',#4); 15#6=CARTESIAN_POINT('',(0.0,5.0,0.0)); 16#7=VERTEX_POINT('',#6); 17#8=CARTESIAN_POINT('',(10.0,0.0,0.0)); 18#9=VERTEX_POINT('',#8); 19#10=CARTESIAN_POINT('',(5.0,10.0,0.0)); 20#11=VERTEX_POINT('',#10); 21#12=CARTESIAN_POINT('',(10.0,5.0,0.0)); 22#13=VERTEX_POINT('',#12); 23#14=CARTESIAN_POINT('',(0.0,10.0,0.0)); 24#15=VERTEX_POINT('',#14); 25#16=CARTESIAN_POINT('',(5.0,0.0,0.0)); 26#17=VERTEX_POINT('',#16); 27#18=CARTESIAN_POINT('',(0.0,5.0,0.0)); 28#19=DIRECTION('',(0.894427191,-0.4472135955,0.0)); 29#20=VECTOR('',#19,11.1803398875); 30#21=LINE('',#18,#20); 31#22=CARTESIAN_POINT('',(0.0,5.0)); 32#23=DIRECTION('',(0.894427191,-0.4472135955)); 33#24=VECTOR('',#23,11.1803398875); 34#25=LINE('',#22,#24); 35#26=DEFINITIONAL_REPRESENTATION('',(#25),#*); 36#27=PCURVE('',#5,#26); 37#28=SURFACE_CURVE('',#21,(#27),.PCURVE_S1.); 38#29=EDGE_CURVE('crossing_edge_A',#7,#9,#28,.T.); 39#30=ORIENTED_EDGE('',*,*,#29,.T.); 40#31=CARTESIAN_POINT('',(10.0,0.0,0.0)); 41#32=DIRECTION('',(-0.4472135955,0.894427191,0.0)); 42#33=VECTOR('',#32,11.1803398875); 43#34=LINE('',#31,#33); 44#35=CARTESIAN_POINT('',(10.0,0.0)); 45#36=DIRECTION('',(-0.4472135955,0.894427191)); 46#37=VECTOR('',#36,11.1803398875); 47#38=LINE('',#35,#37); 48#39=DEFINITIONAL_REPRESENTATION('',(#38),#*); 49#40=PCURVE('',#5,#39); 50#41=SURFACE_CURVE('',#34,(#40),.PCURVE_S1.); 51#42=EDGE_CURVE('',#9,#11,#41,.T.); 52#43=ORIENTED_EDGE('',*,*,#42,.T.); 53#44=CARTESIAN_POINT('',(5.0,10.0,0.0)); 54#45=DIRECTION('',(0.707106781187,-0.707106781187,0.0)); 55#46=VECTOR('',#45,7.07106781187); 56#47=LINE('',#44,#46); 57#48=CARTESIAN_POINT('',(5.0,10.0)); 58#49=DIRECTION('',(0.707106781187,-0.707106781187)); 59#50=VECTOR('',#49,7.07106781187); 60#51=LINE('',#48,#50); 61#52=DEFINITIONAL_REPRESENTATION('',(#51),#*); 62#53=PCURVE('',#5,#52); 63#54=SURFACE_CURVE('',#47,(#53),.PCURVE_S1.); 64#55=EDGE_CURVE('crossing_edge_B',#11,#13,#54,.T.); 65#56=ORIENTED_EDGE('',*,*,#55,.T.); 66#57=CARTESIAN_POINT('',(10.0,5.0,0.0)); 67#58=DIRECTION('',(-0.894427191,0.4472135955,0.0)); 68#59=VECTOR('',#58,11.1803398875); 69#60=LINE('',#57,#59); 70#61=CARTESIAN_POINT('',(10.0,5.0)); 71#62=DIRECTION('',(-0.894427191,0.4472135955)); 72#63=VECTOR('',#62,11.1803398875); 73#64=LINE('',#61,#63); 74#65=DEFINITIONAL_REPRESENTATION('',(#64),#*); 75#66=PCURVE('',#5,#65); 76#67=SURFACE_CURVE('',#60,(#66),.PCURVE_S1.); 77#68=EDGE_CURVE('',#13,#15,#67,.T.); 78#69=ORIENTED_EDGE('',*,*,#68,.T.); 79#70=CARTESIAN_POINT('',(0.0,10.0,0.0)); 80#71=DIRECTION('',(0.4472135955,-0.894427191,0.0)); 81#72=VECTOR('',#71,11.1803398875); 82#73=LINE('',#70,#72); 83#74=CARTESIAN_POINT('',(0.0,10.0)); 84#75=DIRECTION('',(0.4472135955,-0.894427191)); 85#76=VECTOR('',#75,11.1803398875); 86#77=LINE('',#74,#76); 87#78=DEFINITIONAL_REPRESENTATION('',(#77),#*); 88#79=PCURVE('',#5,#78); 89#80=SURFACE_CURVE('',#73,(#79),.PCURVE_S1.); 90#81=EDGE_CURVE('',#15,#17,#80,.T.); 91#82=ORIENTED_EDGE('',*,*,#81,.T.); 92#83=CARTESIAN_POINT('',(5.0,0.0,0.0)); 93#84=DIRECTION('',(-0.707106781187,0.707106781187,0.0)); 94#85=VECTOR('',#84,7.07106781187); 95#86=LINE('',#83,#85); 96#87=CARTESIAN_POINT('',(5.0,0.0)); 97#88=DIRECTION('',(-0.707106781187,0.707106781187)); 98#89=VECTOR('',#88,7.07106781187); 99#90=LINE('',#87,#89); 100#91=DEFINITIONAL_REPRESENTATION('',(#90),#*); 101#92=PCURVE('',#5,#91); 102#93=SURFACE_CURVE('',#86,(#92),.PCURVE_S1.); 103#94=EDGE_CURVE('',#17,#7,#93,.T.); 104#95=ORIENTED_EDGE('',*,*,#94,.T.); 105#96=EDGE_LOOP('',(#30,#43,#56,#69,#82,#95)); 106#97=GEOMETRIC_CURVE_SET('',(#96)); 107#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 108#9051=PRODUCT('Twi176','Twi176','',(#9050)); 109#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 110#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 111#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 112#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 113#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 114#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 115#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 116#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 117#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 118#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#97),#9060); 119#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 120ENDSEC; 121END-ISO-10303-21;