step-examples/12-3b-wires/Twi106.stp
Sources
- OCCT ShapeFix_Wire.cxx:2967 (FixIntersectingEdges)
Description
FixIntersectingEdges repairs wire self-intersections by splitting and re-ordering edges. Multiple intersection points without upper-bound tolerance enforcement cause accumulation cascade: each split generates additional vertices; re-insertion may create new intersections at previously-clean edge pairs. Wire with 5+ edges in cascading zigzag pattern exhibits unbounded vertex accumulation or silent partial repair.
Reproducer recipe
Wire with 5 edges (P0->P1->P2->P3->P4->P0) in zigzag: E2 crosses E1; E3 crosses E2; E4 crosses E3; E5 crosses E4 and E1. FixIntersectingEdges splits each; split vertices create new intersection cascade between E4 and newly-split E2. Iteration limit or tolerance cap never enforced.
Expected kernel behavior
Bound repair iterations and enforce that tolerance does not grow with each split; reject if unresolvable.
Expected validation
occt=shape(1)/shape(1) gmsh=shape(39) ifc=schema_n/a
Tier-3 assertions
n_faces_total == 6
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes
1ISO-10303-21; 2/* Twi106: Two ADVANCED_FACEs on PLANEs in a CLOSED_SHELL; face0: 5-edge cascading zigzag wire on PLANE at z=0; P0=(0,0,0), P1=(8,4,0), P2=(2,4,0), P3=(6,0,0), P4=(4,6,0); E0(P0âP1) crosses E2(P2âP3); E1(P1âP2) crosses E3(P3âP4); E2(P2âP3) also crosses E4(P4âP0); each FixIntersectingEdges split at intersection generates a new vertex; new vertex at mid-E0 creates additional intersection with post-split E2; no upper-bound tolerance cap â cascade continues; algorithm exits silently without bounding repair iterations â IS the mechanism; face1 is a correct 10x10 square at z=-1; all EDGE_CURVEs ARE wired into EDGE_LOOPs â FACE_OUTER_BOUNDs â ADVANCED_FACEs in CLOSED_SHELL â never orphaned */ 3HEADER; 4FILE_DESCRIPTION(('Twi106'),'2;1'); 5FILE_NAME('Twi106.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,0.0,0.0)); 16#7=VERTEX_POINT('',#6); 17#8=CARTESIAN_POINT('',(8.0,4.0,0.0)); 18#9=VERTEX_POINT('',#8); 19#10=CARTESIAN_POINT('',(2.0,4.0,0.0)); 20#11=VERTEX_POINT('',#10); 21#12=CARTESIAN_POINT('',(6.0,0.0,0.0)); 22#13=VERTEX_POINT('',#12); 23#14=CARTESIAN_POINT('',(4.0,6.0,0.0)); 24#15=VERTEX_POINT('',#14); 25#16=CARTESIAN_POINT('',(0.0,0.0,0.0)); 26#17=DIRECTION('',(0.894427191,0.4472135955,0.0)); 27#18=VECTOR('',#17,8.94427191); 28#19=LINE('',#16,#18); 29#20=EDGE_CURVE('',#7,#9,#19,.T.); 30#21=ORIENTED_EDGE('',$,$,#20,.T.); 31#22=CARTESIAN_POINT('',(8.0,4.0,0.0)); 32#23=DIRECTION('',(-1.0,0.0,0.0)); 33#24=VECTOR('',#23,6.0); 34#25=LINE('',#22,#24); 35#26=EDGE_CURVE('',#9,#11,#25,.T.); 36#27=ORIENTED_EDGE('',$,$,#26,.T.); 37#28=CARTESIAN_POINT('',(2.0,4.0,0.0)); 38#29=DIRECTION('',(0.707106781187,-0.707106781187,0.0)); 39#30=VECTOR('',#29,5.65685424949); 40#31=LINE('',#28,#30); 41#32=EDGE_CURVE('',#11,#13,#31,.T.); 42#33=ORIENTED_EDGE('',$,$,#32,.T.); 43#34=CARTESIAN_POINT('',(6.0,0.0,0.0)); 44#35=DIRECTION('',(-0.316227766017,0.948683298051,0.0)); 45#36=VECTOR('',#35,6.32455532034); 46#37=LINE('',#34,#36); 47#38=EDGE_CURVE('',#13,#15,#37,.T.); 48#39=ORIENTED_EDGE('',$,$,#38,.T.); 49#40=CARTESIAN_POINT('',(4.0,6.0,0.0)); 50#41=DIRECTION('',(-0.554700196225,-0.832050294338,0.0)); 51#42=VECTOR('',#41,7.21110255093); 52#43=LINE('',#40,#42); 53#44=EDGE_CURVE('',#15,#7,#43,.T.); 54#45=ORIENTED_EDGE('',$,$,#44,.T.); 55#46=EDGE_LOOP('',(#21,#27,#33,#39,#45)); 56#47=FACE_OUTER_BOUND('',#46,.T.); 57#48=ADVANCED_FACE('',(#47),#5,.T.); 58#49=CARTESIAN_POINT('',(0.0,0.0,-1.0)); 59#50=DIRECTION('',(0.0,0.0,1.0)); 60#51=DIRECTION('',(1.0,0.0,0.0)); 61#52=AXIS2_PLACEMENT_3D('',#49,#50,#51); 62#53=PLANE('',#52); 63#54=CARTESIAN_POINT('',(0.0,0.0,-1.0)); 64#55=VERTEX_POINT('',#54); 65#56=CARTESIAN_POINT('',(10.0,0.0,-1.0)); 66#57=VERTEX_POINT('',#56); 67#58=CARTESIAN_POINT('',(10.0,10.0,-1.0)); 68#59=VERTEX_POINT('',#58); 69#60=CARTESIAN_POINT('',(0.0,10.0,-1.0)); 70#61=VERTEX_POINT('',#60); 71#62=CARTESIAN_POINT('',(0.0,0.0,-1.0)); 72#63=DIRECTION('',(1.0,0.0,0.0)); 73#64=VECTOR('',#63,10.0); 74#65=LINE('',#62,#64); 75#66=EDGE_CURVE('',#55,#57,#65,.T.); 76#67=CARTESIAN_POINT('',(10.0,0.0,-1.0)); 77#68=DIRECTION('',(0.0,1.0,0.0)); 78#69=VECTOR('',#68,10.0); 79#70=LINE('',#67,#69); 80#71=EDGE_CURVE('',#57,#59,#70,.T.); 81#72=CARTESIAN_POINT('',(10.0,10.0,-1.0)); 82#73=DIRECTION('',(-1.0,0.0,0.0)); 83#74=VECTOR('',#73,10.0); 84#75=LINE('',#72,#74); 85#76=EDGE_CURVE('',#59,#61,#75,.T.); 86#77=CARTESIAN_POINT('',(0.0,10.0,-1.0)); 87#78=DIRECTION('',(0.0,-1.0,0.0)); 88#79=VECTOR('',#78,10.0); 89#80=LINE('',#77,#79); 90#81=EDGE_CURVE('',#61,#55,#80,.T.); 91#82=ORIENTED_EDGE('',$,$,#66,.T.); 92#83=ORIENTED_EDGE('',$,$,#71,.T.); 93#84=ORIENTED_EDGE('',$,$,#76,.T.); 94#85=ORIENTED_EDGE('',$,$,#81,.T.); 95#86=EDGE_LOOP('',(#82,#83,#84,#85)); 96#87=FACE_OUTER_BOUND('',#86,.T.); 97#88=ADVANCED_FACE('',(#87),#53,.T.); 98#89=CLOSED_SHELL('',(#48,#88)); 99#90=SHELL_BASED_SURFACE_MODEL('',(#89)); 100#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 101#9051=PRODUCT('Twi106','Twi106','',(#9050)); 102#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 103#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 104#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 105#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 106#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 107#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 108#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 109#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 110#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 111#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#90),#9060); 112#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 113ENDSEC; 114END-ISO-10303-21;