Twi202 — ShapeFix_Wire.FixReorder duplicate-vertex-causes-cycle

§12.3b

topology

Sources

Description

ShapeFix_Wire.FixReorder duplicate-vertex-causes-cycle

Reproducer recipe

Expected kernel behavior

Recognize the duplicate edge and the resulting order break: edges built from #13 and #18 are two separate LINE entities with byte-identical geometry — both from (0,0,0) heading (1,0,0) for length 10 — and both of their EDGE_CURVEs connect the same two vertices (#7,#9) in the same direction, so they are the same edge defined twice. The EDGE_LOOP's stored order also doesn't chain: the first edge ends at (10,0,0), but the second (the duplicate) starts back at (0,0,0), not (10,0,0), before the third edge closes from (10,0,0) back to (0,0,0). A kernel must detect the duplicate via curve/vertex comparison, collapse it to a single edge, and separately verify the two remaining edges actually chain head-to-tail before treating this as a valid 3-sided boundary.

Expected validation

occt=shape(1)/shape(1) gmsh=reject 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/* Twi202: Single ADVANCED_FACE on PLANE in CLOSED_SHELL; outer EDGE_LOOP has 3 LINE edges; E0 and E1 both go from V0=(0,0,0) to V2=(10,0,0) — parallel paths sharing both endpoints IS the defect; E2 returns V2→V0; V0 has in-degree 2 and out-degree 2 — FixReorder's linear-chain model cannot resolve theta-graph by simple reordering — duplicate-vertex-causes-cycle IS the mechanism; EDGE_LOOP IS wired into FACE_OUTER_BOUND -> ADVANCED_FACE in CLOSED_SHELL — never orphaned */
3HEADER;
4FILE_DESCRIPTION(('Twi202'),'2;1');
5FILE_NAME('Twi202.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,0.0,0.0));
18#9=VERTEX_POINT('',#8);
19#10=CARTESIAN_POINT('',(0.0,0.0,0.0));
20#11=DIRECTION('',(1.0,0.0,0.0));
21#12=VECTOR('',#11,10.0);
22#13=LINE('',#10,#12);
23#14=EDGE_CURVE('',#7,#9,#13,.T.);
24#15=CARTESIAN_POINT('',(0.0,0.0,0.0));
25#16=DIRECTION('',(1.0,0.0,0.0));
26#17=VECTOR('',#16,10.0);
27#18=LINE('',#15,#17);
28#19=EDGE_CURVE('',#7,#9,#18,.T.);
29#20=CARTESIAN_POINT('',(10.0,0.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,#7,#23,.T.);
34#25=ORIENTED_EDGE('',$,$,#14,.T.);
35#26=ORIENTED_EDGE('',$,$,#19,.T.);
36#27=ORIENTED_EDGE('',$,$,#24,.T.);
37#28=EDGE_LOOP('',(#25,#26,#27));
38#29=FACE_OUTER_BOUND('',#28,.T.);
39#30=ADVANCED_FACE('',(#29),#5,.T.);
40#31=CLOSED_SHELL('',(#30));
41#32=SHELL_BASED_SURFACE_MODEL('',(#31));
42#9050=PRODUCT_CONTEXT('',#9000,'mechanical');
43#9051=PRODUCT('Twi202','Twi202','',(#9050));
44#9052=PRODUCT_DEFINITION_FORMATION('','',#9051);
45#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design');
46#9054=PRODUCT_DEFINITION('','','',#9052,#9053);
47#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054);
48#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
49#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
50#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
51#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value','');
52#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D'));
53#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#32),#9060);
54#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061);
55ENDSEC;
56END-ISO-10303-21;