step-examples/12-3b-wires/Twi053.stp
Sources
- OCCT `ShapeFix_Wire::FixClosed` (`ShapeFix_Wire.hxx:325`)
Description
A wire's last edge ends at a vertex distinct from where its first edge starts, with a 3D gap that exceeds working precision but is below the maximum-tolerance budget. The wire is intended to be closed (it bounds a face) but is in fact a chain.
Reproducer recipe
A FACE_OUTER_BOUND wire with three edges whose vertices form a closed triangle minus one side — the "closing" edge is missing entirely.
Expected kernel behavior
detect the wire's open status; close it by inserting a synthetic edge between the dangling vertices, by snapping the dangling vertices together, or by rejecting the face. Closure tolerance must come from the kernel's policy, not from a hard-coded value.
Notes
Existing Twi006 covers a related closure issue. This is the sub-pipeline that applies near-end-of-wire connect/degenerate/lacking fixes. Synonyms: "wire missing closing edge with large gap", "open chain wire intended to bound face", "first and last vertex don't coincide in wire", "triangle wire missing one of three sides".
Expected validation
occt=shape(1)/shape(1) gmsh=reject ifc=schema_n/a
Closure intent
sheet — the open shell is the intended final geometry; a solid-only kernel should cleanly refuse.
Tier-3 assertions
n_edges_total >= 3face[0].surface_type == "plane"n_vertices_total >= 6
Cross-references
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes
1ISO-10303-21; 2/* Twi053: ADVANCED_FACE on a PLANE (10x10 right triangle); EDGE_LOOP contains only TWO EDGE_CURVEs â bottom (v_blâv_br) and right (v_brâv_tr) â the hypotenuse closing edge is ENTIRELY MISSING; first vertex v_bl at (0,0,0) and last vertex v_tr at (10,10,0) â 3D gap of ~14.14 units, far exceeding precision; the missing closing edge IS the mechanism (open chain wire on a face); all EDGE_CURVEs ARE wired into EDGE_LOOP â FACE_OUTER_BOUND â ADVANCED_FACE in CLOSED_SHELL â never orphaned; kernel must detect open status and close by inserting synthetic edge, snapping vertices, or rejecting the face */ 3HEADER; 4FILE_DESCRIPTION(('Twi053'),'2;1'); 5FILE_NAME('Twi053.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('',(10.0,10.0,0.0)); 20#11=VERTEX_POINT('',#10); 21#12=CARTESIAN_POINT('',(0.0,0.0,0.0)); 22#13=DIRECTION('',(1.0,0.0,0.0)); 23#14=VECTOR('',#13,10.0); 24#15=LINE('',#12,#14); 25#16=EDGE_CURVE('',#7,#9,#15,.T.); 26#17=ORIENTED_EDGE('',$,$,#16,.T.); 27#18=CARTESIAN_POINT('',(10.0,0.0,0.0)); 28#19=DIRECTION('',(0.0,1.0,0.0)); 29#20=VECTOR('',#19,10.0); 30#21=LINE('',#18,#20); 31#22=EDGE_CURVE('',#9,#11,#21,.T.); 32#23=ORIENTED_EDGE('',$,$,#22,.T.); 33#24=EDGE_LOOP('',(#17,#23)); 34#25=CARTESIAN_POINT('',(20.0,0.0,0.0)); 35#26=VERTEX_POINT('',#25); 36#27=CARTESIAN_POINT('',(25.0,0.0,0.0)); 37#28=VERTEX_POINT('',#27); 38#29=CARTESIAN_POINT('',(25.0,5.0,0.0)); 39#30=VERTEX_POINT('',#29); 40#31=CARTESIAN_POINT('',(20.0,5.0,0.0)); 41#32=VERTEX_POINT('',#31); 42#33=CARTESIAN_POINT('',(0.0,0.0,0.0)); 43#34=DIRECTION('',(0.0,0.0,1.0)); 44#35=DIRECTION('',(1.0,0.0,0.0)); 45#36=AXIS2_PLACEMENT_3D('',#33,#34,#35); 46#37=PLANE('',#36); 47#38=CARTESIAN_POINT('',(20.0,0.0,0.0)); 48#39=DIRECTION('',(1.0,0.0,0.0)); 49#40=VECTOR('',#39,5.0); 50#41=LINE('',#38,#40); 51#42=EDGE_CURVE('',#26,#28,#41,.T.); 52#43=ORIENTED_EDGE('',$,$,#42,.T.); 53#44=CARTESIAN_POINT('',(25.0,0.0,0.0)); 54#45=DIRECTION('',(0.0,1.0,0.0)); 55#46=VECTOR('',#45,5.0); 56#47=LINE('',#44,#46); 57#48=EDGE_CURVE('',#28,#30,#47,.T.); 58#49=ORIENTED_EDGE('',$,$,#48,.T.); 59#50=CARTESIAN_POINT('',(25.0,5.0,0.0)); 60#51=DIRECTION('',(-1.0,0.0,0.0)); 61#52=VECTOR('',#51,5.0); 62#53=LINE('',#50,#52); 63#54=EDGE_CURVE('',#30,#32,#53,.T.); 64#55=ORIENTED_EDGE('',$,$,#54,.T.); 65#56=CARTESIAN_POINT('',(20.0,5.0,0.0)); 66#57=DIRECTION('',(0.0,-1.0,0.0)); 67#58=VECTOR('',#57,5.0); 68#59=LINE('',#56,#58); 69#60=EDGE_CURVE('',#32,#26,#59,.T.); 70#61=ORIENTED_EDGE('',$,$,#60,.T.); 71#62=EDGE_LOOP('',(#43,#49,#55,#61)); 72#63=FACE_OUTER_BOUND('',#24,.T.); 73#64=ADVANCED_FACE('',(#63),#5,.T.); 74#65=FACE_OUTER_BOUND('',#62,.T.); 75#66=ADVANCED_FACE('',(#65),#37,.T.); 76#67=CLOSED_SHELL('',(#64,#66)); 77#68=SHELL_BASED_SURFACE_MODEL('',(#67)); 78#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 79#9051=PRODUCT('Twi053','Twi053','',(#9050)); 80#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 81#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 82#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 83#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 84#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 85#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 86#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 87#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 88#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 89#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#68),#9060); 90#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 91ENDSEC; 92END-ISO-10303-21;