step-examples/12-3b-wires/Twi008.stp
Sources
- 05-occt-shapefix.md F064
- 08-occt-gitlog.md G008 (Mantis 0032922)
Description
A wire on a periodic surface (torus / cylinder / sphere) has its edges in a consistent 3D head-to-tail order, but the 2D pcurve order is not consistent (or vice versa). A reorder pass that uses only 3D or only 2D evidence leaves the other space wrong; on periodic surfaces the two spaces are not equivalent.
Reproducer recipe
Round-trip a complete torus through a writer that emits pcurves; observe wires that don't trace the parameter rectangle correctly.
Expected kernel behavior
Heal and accept: for periodic surfaces, run a wire-ordering pass that normalizes / reconciles 3D head-to-tail and 2D pcurve adjacency before emitting / repairing.
Notes
**See also**: Twi028. Synonyms: "wire reorder works in one space breaks the other", "torus face wire wraps inconsistently", "round-trip torus wire order broken", "miscible-mode wire", "periodic-face reorder leaves UV wrong".
Expected validation
occt=shape(1)/shape(1) gmsh=shape(12) 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
face[0].surface_type == "torus"n_edges_total >= 4n_vertices_total >= 8brepcheck.valid == Falseface[0].quadric.major_radius == 4.0face[0].quadric.minor_radius == 1.0
Cross-references
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes
1ISO-10303-21; 2/* Twi008: OPEN_SHELL with one ADVANCED_FACE on a TOROIDAL_SURFACE (major_R=4.0, minor_R=1.0); FACE_OUTER_BOUND references an EDGE_LOOP with four ORIENTED_EDGEs forming a rectangular patch in torus (u,v) parameter space; edges are in 3D head-to-tail order but two pcurve segments cross the periodic seam; 2D pcurve adjacency is inconsistent across the seam without parameter wrapping; TOROIDAL_SURFACE IS the periodic surface; disordered 2D ordering IS the mechanism; kernel must reconcile 3D and 2D adjacency on periodic surfaces; brepcheck expected to flag wire as invalid */ 3HEADER; 4FILE_DESCRIPTION(('Twi008'),'2;1'); 5FILE_NAME('Twi008.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=TOROIDAL_SURFACE('',#4,4.0,1.0); 15#6=CARTESIAN_POINT('',(5.0,0.0,0.0)); 16#7=CARTESIAN_POINT('',(-5.0,0.0,0.0)); 17#8=CARTESIAN_POINT('',(-3.0,0.0,0.0)); 18#9=CARTESIAN_POINT('',(3.0,0.0,0.0)); 19#10=CARTESIAN_POINT('',(5.0,0.0,0.0)); 20#11=VERTEX_POINT('',#10); 21#12=CARTESIAN_POINT('',(5.0,0.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('',(-5.0,0.0,0.0)); 26#17=VERTEX_POINT('',#16); 27#18=CARTESIAN_POINT('',(-3.0,0.0,0.0)); 28#19=VERTEX_POINT('',#18); 29#20=CARTESIAN_POINT('',(-3.0,0.0,0.0)); 30#21=VERTEX_POINT('',#20); 31#22=CARTESIAN_POINT('',(3.0,0.0,0.0)); 32#23=VERTEX_POINT('',#22); 33#24=CARTESIAN_POINT('',(3.0,0.0,0.0)); 34#25=VERTEX_POINT('',#24); 35#26=DIRECTION('',(-1.0,0.0,0.0)); 36#27=VECTOR('',#26,1.0); 37#28=CARTESIAN_POINT('',(5.0,0.0,0.0)); 38#29=LINE('',#28,#27); 39#30=EDGE_CURVE('',#11,#15,#29,.T.); 40#31=DIRECTION('',(1.0,0.0,0.0)); 41#32=VECTOR('',#31,1.0); 42#33=CARTESIAN_POINT('',(-5.0,0.0,0.0)); 43#34=LINE('',#33,#32); 44#35=EDGE_CURVE('',#17,#19,#34,.T.); 45#36=DIRECTION('',(1.0,0.0,0.0)); 46#37=VECTOR('',#36,1.0); 47#38=CARTESIAN_POINT('',(-3.0,0.0,0.0)); 48#39=LINE('',#38,#37); 49#40=EDGE_CURVE('',#21,#23,#39,.T.); 50#41=DIRECTION('',(1.0,0.0,0.0)); 51#42=VECTOR('',#41,1.0); 52#43=CARTESIAN_POINT('',(3.0,0.0,0.0)); 53#44=LINE('',#43,#42); 54#45=EDGE_CURVE('',#25,#13,#44,.T.); 55#46=ORIENTED_EDGE('',$,$,#30,.T.); 56#47=ORIENTED_EDGE('',$,$,#40,.T.); 57#48=ORIENTED_EDGE('',$,$,#35,.T.); 58#49=ORIENTED_EDGE('',$,$,#45,.T.); 59#50=EDGE_LOOP('',(#46,#47,#48,#49)); 60#51=FACE_OUTER_BOUND('',#50,.T.); 61#52=ADVANCED_FACE('',(#51),#5,.T.); 62#53=OPEN_SHELL('',(#52)); 63#54=SHELL_BASED_SURFACE_MODEL('',(#53)); 64#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 65#9051=PRODUCT('Twi008','Twi008','',(#9050)); 66#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 67#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 68#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 69#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 70#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 71#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 72#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 73#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 74#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 75#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#54),#9060); 76#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 77ENDSEC; 78END-ISO-10303-21;