Twi096 — Wire with internal cross-loop translates incorrectly

§12.3b wires/loops/edges

P1 — silent data loss

topology

Sources

Description

A STEP wire encodes a self-crossing path: edges visit a shared vertex twice, forming a figure-eight or a small detour loop. The reader builds a wire object that conflates the two visits, dropping the second occurrence; geometry is lost.

Reproducer recipe

Eight-edge wire whose vertex sequence is `A → B → C → D → B → E → F → A`. Vertex B appears twice (figure-eight cross). Reader collapses to a six-edge wire `A → B → C → D → E → F → A`.

Expected kernel behavior

Heal and accept: normalize the wire-builder to allow the same vertex to appear more than once in the vertex sequence of an open or closed wire; the topology is figure-eight, not a simple cycle.

Notes

**See also**: Twi050, Twi076. Synonyms: "self-crossing wire collapses on translation", "vertex visited twice gets deduped", "figure-eight wire path lost", "STEP wire crosses itself but reader simplifies", "cross-loop in wire causes geometry loss".

Expected validation

occt=empty/empty gmsh=empty ifc=schema_n/a

Byte assertions

Tier-3 assertions

Cross-references

Twi050, Twi076

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* Twi096: GEOMETRIC_CURVE_SET containing EDGE_LOOP with 7 LINE edges; vertex sequence A→B→C→D→B→E→F→A (figure-eight: vertex B visited twice); edges: 'A_to_B'(A→B), B→C, C→D, 'D_to_B_again'(D→B), 'B_to_E'(B→E), E→F, F→A; wire reader collapses the second visit to B, dropping D→B or B→E segment; cross-loop in wire causes geometry loss — figure-eight topology not preserved; GEOMETRIC_CURVE_SET IS model entity — OCC yields empty; all EDGE_CURVEs ARE wired into EDGE_LOOP; never orphaned */
3HEADER;
4FILE_DESCRIPTION(('Twi096'),'2;1');
5FILE_NAME('Twi096.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=VERTEX_POINT('',#1);
12#3=CARTESIAN_POINT('',(2.0,1.0,0.0));
13#4=VERTEX_POINT('',#3);
14#5=CARTESIAN_POINT('',(4.0,2.0,0.0));
15#6=VERTEX_POINT('',#5);
16#7=CARTESIAN_POINT('',(3.0,3.0,0.0));
17#8=VERTEX_POINT('',#7);
18#9=CARTESIAN_POINT('',(1.0,3.0,0.0));
19#10=VERTEX_POINT('',#9);
20#11=CARTESIAN_POINT('',(-1.0,2.0,0.0));
21#12=VERTEX_POINT('',#11);
22#13=CARTESIAN_POINT('',(0.0,0.0,0.0));
23#14=DIRECTION('',(0.894427191,0.4472135955,0.0));
24#15=VECTOR('',#14,2.2360679775);
25#16=LINE('',#13,#15);
26#17=EDGE_CURVE('A_to_B',#2,#4,#16,.T.);
27#18=ORIENTED_EDGE('',$,$,#17,.T.);
28#19=CARTESIAN_POINT('',(2.0,1.0,0.0));
29#20=DIRECTION('',(0.894427191,0.4472135955,0.0));
30#21=VECTOR('',#20,2.2360679775);
31#22=LINE('',#19,#21);
32#23=EDGE_CURVE('',#4,#6,#22,.T.);
33#24=ORIENTED_EDGE('',$,$,#23,.T.);
34#25=CARTESIAN_POINT('',(4.0,2.0,0.0));
35#26=DIRECTION('',(-0.707106781187,0.707106781187,0.0));
36#27=VECTOR('',#26,1.41421356237);
37#28=LINE('',#25,#27);
38#29=EDGE_CURVE('',#6,#8,#28,.T.);
39#30=ORIENTED_EDGE('',$,$,#29,.T.);
40#31=CARTESIAN_POINT('',(3.0,3.0,0.0));
41#32=DIRECTION('',(-0.4472135955,-0.894427191,0.0));
42#33=VECTOR('',#32,2.2360679775);
43#34=LINE('',#31,#33);
44#35=EDGE_CURVE('D_to_B_again',#8,#4,#34,.T.);
45#36=ORIENTED_EDGE('',$,$,#35,.T.);
46#37=CARTESIAN_POINT('',(2.0,1.0,0.0));
47#38=DIRECTION('',(-0.4472135955,0.894427191,0.0));
48#39=VECTOR('',#38,2.2360679775);
49#40=LINE('',#37,#39);
50#41=EDGE_CURVE('B_to_E',#4,#10,#40,.T.);
51#42=ORIENTED_EDGE('',$,$,#41,.T.);
52#43=CARTESIAN_POINT('',(1.0,3.0,0.0));
53#44=DIRECTION('',(-0.894427191,-0.4472135955,0.0));
54#45=VECTOR('',#44,2.2360679775);
55#46=LINE('',#43,#45);
56#47=EDGE_CURVE('',#10,#12,#46,.T.);
57#48=ORIENTED_EDGE('',$,$,#47,.T.);
58#49=CARTESIAN_POINT('',(-1.0,2.0,0.0));
59#50=DIRECTION('',(0.4472135955,-0.894427191,0.0));
60#51=VECTOR('',#50,2.2360679775);
61#52=LINE('',#49,#51);
62#53=EDGE_CURVE('',#12,#2,#52,.T.);
63#54=ORIENTED_EDGE('',$,$,#53,.T.);
64#55=EDGE_LOOP('',(#18,#24,#30,#36,#42,#48,#54));
65#56=GEOMETRIC_CURVE_SET('',(#55));
66#9050=PRODUCT_CONTEXT('',#9000,'mechanical');
67#9051=PRODUCT('Twi096','Twi096','',(#9050));
68#9052=PRODUCT_DEFINITION_FORMATION('','',#9051);
69#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design');
70#9054=PRODUCT_DEFINITION('','','',#9052,#9053);
71#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054);
72#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
73#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
74#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
75#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value','');
76#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D'));
77#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#56),#9060);
78#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061);
79ENDSEC;
80END-ISO-10303-21;