step-examples/12-3b-wires/Twi066.stp
Sources
- OCCT `ShapeAnalysis_Wire::CheckClosed` (`ShapeAnalysis_Wire.hxx:220`)
Description
An EDGE_LOOP is "closed" only if its first and last VERTEX_POINTs coincide in *both* 3D and UV. Either condition can fail independently; the diagnostic must report the two outcomes separately so the caller can decide which representation to fix. Typical fixture: a 3-edge open EDGE_LOOP missing its closing ORIENTED_EDGE entirely, where additionally the last edge's 3D LINE direction/length doesn't even reach the declared end VERTEX_POINT (e.g., a LINE from (10,10,0) along -X over length 1 reaches (9,10,0) but the edge claims its endpoint is (1,10,0)).
Reproducer recipe
As Twi053 but additionally the pcurves of the first and last edges have endpoints in different parameter bands, AND/OR the last edge's underlying 3D LINE doesn't actually reach the declared end VERTEX_POINT (the wire is open in 3D *and* open in UV).
Expected kernel behavior
emit FAIL1/DONE1 for the 3D-side and FAIL2/DONE2 for the 2D-side; never collapse them into one boolean "closed".
Notes
3D-closed but UV-open is a separate defect (Twi-class on shifted pcurves). Synonyms: "wire closure check separate for spatial and parametric", "wire reports two closure flags one per dimension", "open in 3D but closed in UV or vice versa", "closure check returns spatial and parametric outcomes".
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
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes
1ISO-10303-21; 2/* Twi066: ADVANCED_FACE on a PLANE; EDGE_LOOP with THREE EDGE_CURVEs â closing edge ENTIRELY MISSING; edge1 (bottom): v_bl(0,0,0)âv_br(10,0,0) â correct; edge2 (right): v_br(10,0,0)âv_tr(10,10,0) â correct; edge3 (partial top-left): v_tr(10,10,0)âv_end(1,10,0) â the 3D LINE goes from (10,10,0) with direction (-1,0,0) magnitude 1.0, reaching only (9,10,0), but declared end vertex is at (1,10,0) â 3D LINE does NOT reach the declared end VERTEX_POINT (9 vs 1 in X); closing left-side edge is ENTIRELY MISSING â wire is open in 3D (first vertex (0,0,0) â last vertex (1,10,0)) AND the 3D geometry is defective on the last edge (vertex/3D endpoint mismatch); CheckClosed must report FAIL1 for 3D closure AND FAIL2 for 2D/param closure separately; both defects coexist and must be diagnosed independently; all EDGE_CURVEs ARE wired into EDGE_LOOP â FACE_OUTER_BOUND â ADVANCED_FACE in CLOSED_SHELL */ 3HEADER; 4FILE_DESCRIPTION(('Twi066'),'2;1'); 5FILE_NAME('Twi066.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('',(1.0,10.0,0.0)); 22#13=VERTEX_POINT('',#12); 23#14=CARTESIAN_POINT('',(5.0,0.0,0.0)); 24#15=VERTEX_POINT('',#14); 25#16=CARTESIAN_POINT('',(10.0,5.0,0.0)); 26#17=VERTEX_POINT('',#16); 27#18=CARTESIAN_POINT('',(0.0,0.0,0.0)); 28#19=DIRECTION('',(1.0,0.0,0.0)); 29#20=VECTOR('',#19,10.0); 30#21=LINE('',#18,#20); 31#22=EDGE_CURVE('',#7,#9,#21,.T.); 32#23=ORIENTED_EDGE('',$,$,#22,.T.); 33#24=CARTESIAN_POINT('',(10.0,0.0,0.0)); 34#25=DIRECTION('',(0.0,1.0,0.0)); 35#26=VECTOR('',#25,10.0); 36#27=LINE('',#24,#26); 37#28=EDGE_CURVE('',#9,#11,#27,.T.); 38#29=ORIENTED_EDGE('',$,$,#28,.T.); 39#30=CARTESIAN_POINT('',(10.0,10.0,0.0)); 40#31=DIRECTION('',(-1.0,0.0,0.0)); 41#32=VECTOR('',#31,1.0); 42#33=LINE('',#30,#32); 43#34=EDGE_CURVE('',#11,#13,#33,.T.); 44#35=ORIENTED_EDGE('',$,$,#34,.T.); 45#36=EDGE_LOOP('',(#23,#29,#35)); 46#37=FACE_OUTER_BOUND('',#36,.T.); 47#38=ADVANCED_FACE('',(#37),#5,.T.); 48#39=CLOSED_SHELL('',(#38)); 49#40=SHELL_BASED_SURFACE_MODEL('',(#39)); 50#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 51#9051=PRODUCT('Twi066','Twi066','',(#9050)); 52#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 53#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 54#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 55#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 56#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 57#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 58#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 59#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 60#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 61#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#40),#9060); 62#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 63ENDSEC; 64END-ISO-10303-21;