step-examples/12-3b-wires/Twi296.stp
Sources
- OCCT `ShapeFix_Face::FixMissingSeam` degenerated-torus apex branch (`ShapeFix_Face.cxx:1640-1650`) @ `bd2a789f15235755ce4d1a3b07379a2e062fdc2e`
- occt-coverage/tkshhealing/problems.json `tkshh-wire-missing-or-bad-degenerated-edge`, subvariant "degenerated torus (major radius < minor radius): apex edge at aPhi = acos(-R/r) (FixMissingSeam)"
Description
Twi021 demonstrates the missing-degenerate-edge mechanism on a `CONICAL_SURFACE` apex. This fixture covers the torus-specific singularity named as still missing in the problem record's notes: when a torus's major radius `R` is smaller than its minor (tube) radius `r` ("spindle torus", self-intersecting in 3D but a legal STEP `TOROIDAL_SURFACE`), the tube radius `R + r*cos(v)` reaches zero at `v = acos(-R/r)` — at that one V-row the ENTIRE U-circle collapses to a single point on the torus's own axis, exactly analogous to a cone apex or sphere pole. A face whose wire crosses this V-row needs a degenerate edge bridging it; this fixture's wire omits it.
Reproducer recipe
`ADVANCED_FACE` on a `TOROIDAL_SURFACE` (major_radius=2, minor_radius=5); `FACE_OUTER_BOUND` → `EDGE_LOOP` with two meridian `CIRCLE`-arc edges (u=0 and u=π) running from the outer-equator base circle (v=0, radius 7) to the singular row (v≈113.58°, where both meridians converge on the SAME 3D point via TWO SEPARATE `VERTEX_POINT` instances, mirroring Twi021's two-separate-apex-vertex pattern), closed by a base semicircle arc; no degenerate `ORIENTED_EDGE` bridges the two apex vertex instances.
Expected kernel behavior
insert a degenerate edge at `aPhi = acos(-R/r)` bridging the singular row (the face-healing stage::missing-seam repair), or reject as malformed.
Notes
**See also**: Twi021 (the analytic-cone-apex sibling of this mechanism), Twi287 (a different torus defect — full-period closed meridian edges on an ORDINARY, R>r torus — not the same mechanism). Verified live: OCCT 7.8.1 auto-heals exactly as it does for Twi021 — `n_edges_total` comes back as **4** (up from the 3 declared), the extra `edge[0]` having near-zero length (`≈4.8e-12`) and near-zero radius: a synthesized degenerate apex edge. `brepcheck.valid==True`, `face[0].surface_type=="torus"`, `face[0].quadric.major_radius==2.0`, `face[0].quadric.minor_radius==5.0`, `shape(1)/shape(1)` — same documented-divergence pattern as Twi021 (OCC's auto-repair is stronger than the catalog's reject-only stance; conservative kernels should still reject the un-repaired input). Synonyms: "spindle torus missing apex edge", "major radius less than minor radius torus", "torus tube radius reaches zero", "degenerated torus singular row", "torus self-intersecting apex point". Provenance tier: bytes-sufficient.
Expected validation
occt=shape(1)/shape(1) gmsh=shape(8) ifc=schema_n/a
Closure intent
sheet — the open shell is the intended final geometry; a solid-only kernel should cleanly refuse.
Byte assertions
count_entity_def(b'TOROIDAL_SURFACE') == 1count_entity_def(b'VERTEX_POINT') >= 4
Tier-3 assertions
face[0].surface_type == "torus"n_edges_total >= 4n_vertices_total >= 8brepcheck.valid == Trueface[0].quadric.major_radius == 2.0face[0].quadric.minor_radius == 5.0
Cross-references
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* Twi296: OPEN_SHELL with one ADVANCED_FACE on a TOROIDAL_SURFACE (major_radius=2, minor_radius=5 -- major < minor, a 'spindle' torus whose tube radius R + r*cos(v) reaches ZERO at v=acos(-R/r), collapsing the entire U-circle at that row to a single point on the torus axis, a genuine surface singularity analogous to a cone apex); FACE_OUTER_BOUND references an EDGE_LOOP with two meridian CIRCLE-arc edges (u=0 and u=pi) running from the outer-equator base circle (v=0) to the singular row (v=acos(-2/5)), plus one base semicircle arc closing u:0->pi at v=0; NO degenerate ORIENTED_EDGE inserted at the singular row -- the two meridian edges terminate at the SAME 3D point via TWO SEPARATE VERTEX_POINT instances, exactly mirroring Twi021's missing-apex-edge cone pattern but on a torus singularity instead; missing apex-bridging degenerate edge IS the mechanism; apex VERTEX_POINTs ARE wired into EDGE_LOOP meridian edges, FACE_OUTER_BOUND, ADVANCED_FACE, OPEN_SHELL; never orphaned; kernel must insert a degenerate edge at aPhi=acos(-R/r) or reject as malformed */ 3HEADER; 4FILE_DESCRIPTION(('Twi296'),'2;1'); 5FILE_NAME('Twi296.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,2.0000000000,5.0000000000); 15#6=CARTESIAN_POINT('',(0.0,0.0,4.58257569496)); 16#7=VERTEX_POINT('',#6); 17#8=CARTESIAN_POINT('',(0.0,0.0,4.58257569496)); 18#9=VERTEX_POINT('',#8); 19#10=CARTESIAN_POINT('',(7.0,0.0,0.0)); 20#11=VERTEX_POINT('',#10); 21#12=CARTESIAN_POINT('',(-7.0,0.0,0.0)); 22#13=VERTEX_POINT('',#12); 23#14=CARTESIAN_POINT('',(2.0,0.0,0.0)); 24#15=DIRECTION('',(0.0,1.0,0.0)); 25#16=DIRECTION('',(1.0,0.0,0.0)); 26#17=AXIS2_PLACEMENT_3D('',#14,#15,#16); 27#18=CIRCLE('',#17,5.0000000000); 28#19=EDGE_CURVE('',#7,#11,#18,.T.); 29#20=ORIENTED_EDGE('',$,$,#19,.T.); 30#21=CARTESIAN_POINT('',(-2.0,0.0,0.0)); 31#22=DIRECTION('',(0.0,1.0,0.0)); 32#23=DIRECTION('',(-1.0,0.0,0.0)); 33#24=AXIS2_PLACEMENT_3D('',#21,#22,#23); 34#25=CIRCLE('',#24,5.0000000000); 35#26=EDGE_CURVE('',#13,#9,#25,.T.); 36#27=ORIENTED_EDGE('',$,$,#26,.T.); 37#28=CARTESIAN_POINT('',(0.0,0.0,0.0)); 38#29=DIRECTION('',(0.0,0.0,1.0)); 39#30=DIRECTION('',(1.0,0.0,0.0)); 40#31=AXIS2_PLACEMENT_3D('',#28,#29,#30); 41#32=CIRCLE('',#31,7.0000000000); 42#33=EDGE_CURVE('',#11,#13,#32,.T.); 43#34=ORIENTED_EDGE('',$,$,#33,.T.); 44#35=EDGE_LOOP('',(#20,#34,#27)); 45#36=FACE_OUTER_BOUND('',#35,.T.); 46#37=ADVANCED_FACE('',(#36),#5,.T.); 47#38=OPEN_SHELL('',(#37)); 48#39=SHELL_BASED_SURFACE_MODEL('',(#38)); 49#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 50#9051=PRODUCT('Twi296','Twi296','',(#9050)); 51#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 52#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 53#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 54#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 55#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 56#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 57#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 58#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 59#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 60#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#39),#9060); 61#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 62ENDSEC; 63END-ISO-10303-21;