step-examples/12-3b-wires/Twi297.stp
Sources
- OCCT `ShapeFix_Face::FixMissingSeam` B-spline V/U pinch branch (`ShapeFix_Face.cxx:1657-1681`) @ `bd2a789f15235755ce4d1a3b07379a2e062fdc2e`
- occt-coverage/tkshhealing/problems.json `tkshh-wire-missing-or-bad-degenerated-edge`, subvariant "B-spline surface pinched to a point at a U- or V-boundary: pinch detected by 3D distance test, degenerated edge at the pinch (FixMissingSeam, bug 24055)"
Description
A `B_SPLINE_SURFACE` has no intrinsic-singularity flag the way an analytic `CONICAL_SURFACE` does (Twi021) — a pinch is purely a property of the control net (an entire row of control points placed at the identical 3D point), which missing-seam repair's B-spline branch must detect via an explicit 3D-distance test over the boundary's poles. This fixture's `B_SPLINE_SURFACE_WITH_KNOTS` (u_degree=3, v_degree=1) has ALL FOUR of its V=0 control points set to the identical point `(0,0,5)` — a genuine full-row pinch — while its V=1 control points spread into a real curved boundary.
Reproducer recipe
`ADVANCED_FACE` on a `B_SPLINE_SURFACE_WITH_KNOTS` (u_degree=3, v_degree=1, 4×2 control net, all V=0 poles identical); `FACE_OUTER_BOUND` → `EDGE_LOOP` with two `LINE` lateral edges (u=0 and u=1, isoparametric straight lines since v_degree=1) from the pinch to the V=1 boundary's endpoints, plus one `B_SPLINE_CURVE` base edge that is exactly the surface's own V=1 control polygon (no approximation); the two lateral edges terminate at the same 3D point via TWO SEPARATE `VERTEX_POINT` instances (mirroring Twi021); no degenerate `ORIENTED_EDGE` bridges them.
Expected kernel behavior
detect the pinch via a 3D-distance test over the boundary's control points and insert a degenerate edge there (the face-healing stage::missing-seam repair, bug 24055), or reject as malformed.
Notes
**See also**: Twi021 (the analytic-cone-apex sibling of this mechanism, same missing-degenerate-edge structural pattern applied to a B-spline control-net pinch instead). Verified live: OCCT 7.8.1 auto-heals exactly as it does for Twi021/Twi296 — `n_edges_total` comes back as **4** (up from the 3 declared), the extra `edge[3]` having near-zero length (`≈8.2e-17`, `curve_type=="other"`): a synthesized degenerate pinch edge. `brepcheck.valid==True`, `face[0].surface_type=="bspline"`, `face[0].bspline.u_degree==3`, `face[0].bspline.v_degree==1`, `shape(1)/shape(1)`. Synonyms: "B-spline control net pinch missing degenerate edge", "full row of poles coincident", "bug 24055 pinch detection", "B-spline apex 3D distance test", "collapsed control point row". 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'B_SPLINE_SURFACE_WITH_KNOTS') == 1count_entity_def(b'VERTEX_POINT') >= 4contains(b'(0.0,0.0,5.0)')
Tier-3 assertions
face[0].surface_type == "bspline"n_edges_total >= 4n_vertices_total >= 8brepcheck.valid == Trueface[0].bspline.u_degree == 3face[0].bspline.v_degree == 1
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/* Twi297: OPEN_SHELL with one ADVANCED_FACE on a B_SPLINE_SURFACE_WITH_KNOTS (u_degree=3, v_degree=1, 4x2 control net); ALL FOUR V=0 control points are the IDENTICAL point (0,0,5) -- a genuine full-row pinch, detected only via a 3D-distance test over the control net (unlike a CONICAL_SURFACE's intrinsic apex, Twi021's mechanism); V=1 control points Q0(3,0,0), Q1(3,3,0), Q2(0,4,0), Q3(-2,3,0) form a real curved boundary; FACE_OUTER_BOUND references an EDGE_LOOP with two LINE lateral edges (u=0: pinch->Q0; u=1: Q3->pinch -- both isoparametric straight lines since v_degree=1 makes the V-direction linear) plus one B_SPLINE_CURVE base edge (Q0->Q3, the surface's own V=1 control polygon, degree 3, reused exactly, no approximation); NO degenerate ORIENTED_EDGE inserted at the pinch -- the two lateral edges terminate at the SAME 3D point via TWO SEPARATE VERTEX_POINT instances, exactly mirroring Twi021's missing-apex-edge pattern but on a B-spline control-net pinch instead of an analytic cone; missing pinch-bridging degenerate edge IS the mechanism; pinch VERTEX_POINTs ARE wired into EDGE_LOOP lateral edges, FACE_OUTER_BOUND, ADVANCED_FACE, OPEN_SHELL; never orphaned; kernel must insert a degenerate edge at the pinch (ShapeFix_Face::FixMissingSeam B-spline branch, bug 24055) or reject as malformed */ 3HEADER; 4FILE_DESCRIPTION(('Twi297'),'2;1'); 5FILE_NAME('Twi297.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,5.0)); 11#2=CARTESIAN_POINT('',(3.0,0.0,0.0)); 12#3=CARTESIAN_POINT('',(3.0,3.0,0.0)); 13#4=CARTESIAN_POINT('',(0.0,4.0,0.0)); 14#5=CARTESIAN_POINT('',(-2.0,3.0,0.0)); 15#6=CARTESIAN_POINT('',(0.0,0.0,5.0)); 16#7=CARTESIAN_POINT('',(0.0,0.0,5.0)); 17#8=CARTESIAN_POINT('',(0.0,0.0,5.0)); 18#9=B_SPLINE_SURFACE_WITH_KNOTS('',3,1,((#1,#2),(#6,#3),(#7,#4),(#8,#5)),.UNSPECIFIED.,.F.,.F.,.F.,(4,4),(2,2),(0.0,1.0),(0.0,1.0),.UNSPECIFIED.); 19#10=CARTESIAN_POINT('',(0.0,0.0,5.0)); 20#11=VERTEX_POINT('',#10); 21#12=CARTESIAN_POINT('',(0.0,0.0,5.0)); 22#13=VERTEX_POINT('',#12); 23#14=VERTEX_POINT('',#2); 24#15=VERTEX_POINT('',#5); 25#16=DIRECTION('',(0.514495755428,0.0,-0.857492925713)); 26#17=CARTESIAN_POINT('',(0.0,0.0,5.0)); 27#18=VECTOR('',#16,5.83095189485); 28#19=LINE('',#17,#18); 29#20=EDGE_CURVE('',#11,#14,#19,.T.); 30#21=ORIENTED_EDGE('',$,$,#20,.T.); 31#22=B_SPLINE_CURVE_WITH_KNOTS('',3,(#2,#3,#4,#5),.UNSPECIFIED.,.F.,.F.,(4,4),(0.0,1.0),.UNSPECIFIED.); 32#23=EDGE_CURVE('',#14,#15,#22,.T.); 33#24=ORIENTED_EDGE('',$,$,#23,.T.); 34#25=DIRECTION('',(0.324442842262,-0.486664263392,0.811107105654)); 35#26=CARTESIAN_POINT('',(-2.0,3.0,0.0)); 36#27=VECTOR('',#25,6.16441400297); 37#28=LINE('',#26,#27); 38#29=EDGE_CURVE('',#15,#13,#28,.T.); 39#30=ORIENTED_EDGE('',$,$,#29,.T.); 40#31=EDGE_LOOP('',(#21,#24,#30)); 41#32=FACE_OUTER_BOUND('',#31,.T.); 42#33=ADVANCED_FACE('',(#32),#9,.T.); 43#34=OPEN_SHELL('',(#33)); 44#35=SHELL_BASED_SURFACE_MODEL('',(#34)); 45#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 46#9051=PRODUCT('Twi297','Twi297','',(#9050)); 47#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 48#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 49#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 50#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 51#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 52#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 53#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 54#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 55#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 56#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#35),#9060); 57#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 58ENDSEC; 59END-ISO-10303-21;