step-examples/12-3b-wires/Twi164.stp
Sources
- synthesized — no external source cited
Description
ShapeFix_Wire.FixReorder algorithm-cycle
Reproducer recipe
Expected kernel behavior
Reject this as not a simple cycle in any order — the vertex-degree structure rules it out, not just the listed order: vertex (0,5,0) appears in exactly one of the four edges (the segment to (5,10,0)), while vertex (5,10,0) appears in three of them (to (0,5,0), to (10,5,0), and to (5,0,0)) — a degree-1 dead end paired with a degree-3 branch point. The other three edges do form a closed triangle (5,0,0)→(10,5,0)→(5,10,0)→(5,0,0); the fourth edge is a pendant spur off that triangle's (5,10,0) corner, not a fourth side of a diamond. A kernel must compute edge-degree per vertex and reject the loop once it finds a vertex touched by more than two edges, since no permutation of these four edges produces a valid closed quadrilateral.
Expected validation
occt=shape(1)/shape(1) gmsh=reject ifc=schema_n/a
Tier-3 assertions
n_faces_total == 1
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes
1ISO-10303-21; 2/* Twi164: Single ADVANCED_FACE on PLANE in CLOSED_SHELL; outer EDGE_LOOP has 4 LINE edges forming a diamond, listed in shuffled order [E2, E0, E3, E1] IS the defect; E0 (0,5,0)â(5,10,0), E1 (5,0,0)â(10,5,0), E2 (10,5,0)â(5,10,0), E3 (5,10,0)â(5,0,0); correct order is E0, E2 (reversed), E3, E1 (reversed) etc.; shuffled EDGE_LOOP [E2,E0,E3,E1] creates endpoint-matching cycle in FixReorder dependency graph â E0-end = E2-end = (5,10,0) and E3 connects them, creating cyclic dependency IS the mechanism; EDGE_LOOP IS wired into FACE_OUTER_BOUND â ADVANCED_FACE in CLOSED_SHELL â never orphaned */ 3HEADER; 4FILE_DESCRIPTION(('Twi164'),'2;1'); 5FILE_NAME('Twi164.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('',(5.0,0.0,0.0)); 18#9=VERTEX_POINT('',#8); 19#10=CARTESIAN_POINT('',(10.0,5.0,0.0)); 20#11=VERTEX_POINT('',#10); 21#12=CARTESIAN_POINT('',(5.0,10.0,0.0)); 22#13=VERTEX_POINT('',#12); 23#14=CARTESIAN_POINT('',(0.0,5.0,0.0)); 24#15=DIRECTION('',(0.707106781187,0.707106781187,0.0)); 25#16=VECTOR('',#15,7.07106781187); 26#17=LINE('',#14,#16); 27#18=EDGE_CURVE('',#7,#13,#17,.T.); 28#19=CARTESIAN_POINT('',(5.0,0.0,0.0)); 29#20=DIRECTION('',(0.707106781187,0.707106781187,0.0)); 30#21=VECTOR('',#20,7.07106781187); 31#22=LINE('',#19,#21); 32#23=EDGE_CURVE('',#9,#11,#22,.T.); 33#24=CARTESIAN_POINT('',(10.0,5.0,0.0)); 34#25=DIRECTION('',(-0.707106781187,0.707106781187,0.0)); 35#26=VECTOR('',#25,7.07106781187); 36#27=LINE('',#24,#26); 37#28=EDGE_CURVE('',#11,#13,#27,.T.); 38#29=CARTESIAN_POINT('',(5.0,10.0,0.0)); 39#30=DIRECTION('',(0.0,-1.0,0.0)); 40#31=VECTOR('',#30,10.0); 41#32=LINE('',#29,#31); 42#33=EDGE_CURVE('',#13,#9,#32,.T.); 43#34=ORIENTED_EDGE('',$,$,#28,.T.); 44#35=ORIENTED_EDGE('',$,$,#18,.T.); 45#36=ORIENTED_EDGE('',$,$,#33,.T.); 46#37=ORIENTED_EDGE('',$,$,#23,.T.); 47#38=EDGE_LOOP('',(#34,#35,#36,#37)); 48#39=FACE_OUTER_BOUND('',#38,.T.); 49#40=ADVANCED_FACE('',(#39),#5,.T.); 50#41=CLOSED_SHELL('',(#40)); 51#42=SHELL_BASED_SURFACE_MODEL('',(#41)); 52#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 53#9051=PRODUCT('Twi164','Twi164','',(#9050)); 54#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 55#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 56#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 57#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 58#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 59#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 60#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 61#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 62#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 63#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#42),#9060); 64#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 65ENDSEC; 66END-ISO-10303-21;