Twi103 — ShapeFix_Wire.FixSelfIntersectingEdge 30-iteration convergence silently exits

§12.3b (wire/loop/edge)

topology

Sources

Description

FixSelfIntersectingEdge implements hard 30-iteration limit for self-intersection repair convergence. Persistent intersections after 30 iterations cause silent exit without reporting failure status or incomplete repair. Pathological wire geometry with unresolvable self-intersections (e.g., topologically required crossing) fails without diagnostic.

Reproducer recipe

Wire with S-curve self-intersecting topology at 4 edges (forming two crossing pairs). Each repair iteration shifts vertices without resolving underlying topology. After 30 iterations, algorithm exits and returns success despite unresolved intersections.

Expected kernel behavior

Exit with error status or diagnostic indicating convergence failure, not silent acceptance.

Expected validation

occt=shape(1)/shape(1) gmsh=shape(22) ifc=schema_n/a

Tier-3 assertions

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes
1ISO-10303-21;
2/* Twi103: Two ADVANCED_FACEs on PLANEs in a CLOSED_SHELL; face0: 4-edge S-curve (figure-eight crossing) wire on a PLANE at z=0; P0=(0,0,0), P1=(10,10,0), P2=(0,10,0), P3=(10,0,0); E0(P0→P1) and E2(P2→P3) are crossing diagonals — self-intersecting pair; E1(P1→P2) and E3(P3→P0) connect the crossing loop; wire closes (P0 start = P0 end via E3) but topology is a figure-eight; ShapeFix_Wire.FixSelfIntersectingEdge hits 30-iteration hard limit and exits silently without reporting convergence failure — 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(('Twi103'),'2;1');
5FILE_NAME('Twi103.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('',(10.0,10.0,0.0));
18#9=VERTEX_POINT('',#8);
19#10=CARTESIAN_POINT('',(0.0,10.0,0.0));
20#11=VERTEX_POINT('',#10);
21#12=CARTESIAN_POINT('',(10.0,0.0,0.0));
22#13=VERTEX_POINT('',#12);
23#14=CARTESIAN_POINT('',(0.0,0.0,0.0));
24#15=DIRECTION('',(0.707106781187,0.707106781187,0.0));
25#16=VECTOR('',#15,14.1421356237);
26#17=LINE('',#14,#16);
27#18=EDGE_CURVE('',#7,#9,#17,.T.);
28#19=ORIENTED_EDGE('',$,$,#18,.T.);
29#20=CARTESIAN_POINT('',(10.0,10.0,0.0));
30#21=DIRECTION('',(-1.0,0.0,0.0));
31#22=VECTOR('',#21,10.0);
32#23=LINE('',#20,#22);
33#24=EDGE_CURVE('',#9,#11,#23,.T.);
34#25=ORIENTED_EDGE('',$,$,#24,.T.);
35#26=CARTESIAN_POINT('',(0.0,10.0,0.0));
36#27=DIRECTION('',(0.707106781187,-0.707106781187,0.0));
37#28=VECTOR('',#27,14.1421356237);
38#29=LINE('',#26,#28);
39#30=EDGE_CURVE('',#11,#13,#29,.T.);
40#31=ORIENTED_EDGE('',$,$,#30,.T.);
41#32=CARTESIAN_POINT('',(10.0,0.0,0.0));
42#33=DIRECTION('',(-1.0,0.0,0.0));
43#34=VECTOR('',#33,10.0);
44#35=LINE('',#32,#34);
45#36=EDGE_CURVE('',#13,#7,#35,.T.);
46#37=ORIENTED_EDGE('',$,$,#36,.T.);
47#38=EDGE_LOOP('',(#19,#25,#31,#37));
48#39=FACE_OUTER_BOUND('',#38,.T.);
49#40=ADVANCED_FACE('',(#39),#5,.T.);
50#41=CARTESIAN_POINT('',(0.0,0.0,-1.0));
51#42=DIRECTION('',(0.0,0.0,1.0));
52#43=DIRECTION('',(1.0,0.0,0.0));
53#44=AXIS2_PLACEMENT_3D('',#41,#42,#43);
54#45=PLANE('',#44);
55#46=CARTESIAN_POINT('',(0.0,0.0,-1.0));
56#47=VERTEX_POINT('',#46);
57#48=CARTESIAN_POINT('',(10.0,0.0,-1.0));
58#49=VERTEX_POINT('',#48);
59#50=CARTESIAN_POINT('',(10.0,10.0,-1.0));
60#51=VERTEX_POINT('',#50);
61#52=CARTESIAN_POINT('',(0.0,10.0,-1.0));
62#53=VERTEX_POINT('',#52);
63#54=CARTESIAN_POINT('',(0.0,0.0,-1.0));
64#55=DIRECTION('',(1.0,0.0,0.0));
65#56=VECTOR('',#55,10.0);
66#57=LINE('',#54,#56);
67#58=EDGE_CURVE('',#47,#49,#57,.T.);
68#59=CARTESIAN_POINT('',(10.0,0.0,-1.0));
69#60=DIRECTION('',(0.0,1.0,0.0));
70#61=VECTOR('',#60,10.0);
71#62=LINE('',#59,#61);
72#63=EDGE_CURVE('',#49,#51,#62,.T.);
73#64=CARTESIAN_POINT('',(10.0,10.0,-1.0));
74#65=DIRECTION('',(-1.0,0.0,0.0));
75#66=VECTOR('',#65,10.0);
76#67=LINE('',#64,#66);
77#68=EDGE_CURVE('',#51,#53,#67,.T.);
78#69=CARTESIAN_POINT('',(0.0,10.0,-1.0));
79#70=DIRECTION('',(0.0,-1.0,0.0));
80#71=VECTOR('',#70,10.0);
81#72=LINE('',#69,#71);
82#73=EDGE_CURVE('',#53,#47,#72,.T.);
83#74=ORIENTED_EDGE('',$,$,#58,.T.);
84#75=ORIENTED_EDGE('',$,$,#63,.T.);
85#76=ORIENTED_EDGE('',$,$,#68,.T.);
86#77=ORIENTED_EDGE('',$,$,#73,.T.);
87#78=EDGE_LOOP('',(#74,#75,#76,#77));
88#79=FACE_OUTER_BOUND('',#78,.T.);
89#80=ADVANCED_FACE('',(#79),#45,.T.);
90#81=CLOSED_SHELL('',(#40,#80));
91#82=SHELL_BASED_SURFACE_MODEL('',(#81));
92#9050=PRODUCT_CONTEXT('',#9000,'mechanical');
93#9051=PRODUCT('Twi103','Twi103','',(#9050));
94#9052=PRODUCT_DEFINITION_FORMATION('','',#9051);
95#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design');
96#9054=PRODUCT_DEFINITION('','','',#9052,#9053);
97#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054);
98#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
99#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
100#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
101#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value','');
102#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D'));
103#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#82),#9060);
104#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061);
105ENDSEC;
106END-ISO-10303-21;