Gs204 — Surface closed in U only to within 1e-4, so its own closure flag reads false: the same-face seam merge is approved only by comparing isoparametric-curve endpoints

§12.2c surfaces (sub-class: sewing seam merge on a closed surface — `sew-seam-closed-surface-merge`)

P2 — spec deviation (no data loss)

geometry

Sources

Description

One `ADVANCED_FACE` on a `B_SPLINE_SURFACE_WITH_KNOTS`, degree 1 × 1, shaped as a 12-sided prism of radius 1 and height 2: 13 pole columns wrapping the full 360°, where the LAST column is the first column displaced radially by 1e-4 instead of being identical to it. That is 1000× the 1e-7 pole-comparison tolerance, so the surface reports itself NOT closed in U (and it is not closed in V either) while being geometrically closed for every practical purpose. The face's outer bound is the classic seam loop — bottom polyline, the seam line at u=umax reversed, top polyline reversed, the seam line at u=umin reversed — so ONE face carries two distinct, unshared, 1e-4-apart vertical edges that are seam-merge candidates for each other.

Reproducer recipe

`B_SPLINE_SURFACE_WITH_KNOTS` of degree 1 in both directions whose pole grid wraps a full revolution with the last pole column offset from the first by a distance well above `Precision::Confusion()` but far below the model scale (here 1e-4 on a radius-1 prism); one `ADVANCED_FACE` on it bounded by bottom/top polyline `B_SPLINE_CURVE_WITH_KNOTS` edges and the two straight seam-line edges at u=umin and u=umax; sew at tolerance 1e-2.

Expected kernel behavior

the two same-face seam-line edges are recognized as a genuine seam pair and merged, even though the surface exposes no closure flag saying it wraps: the closure test falls back on sampling isoparametric curves and comparing each one's endpoint-to-endpoint distance against its endpoint-to-midpoint distance, which detects the wrap; the 2D-overlap conditions then approve the merge.

Notes

Why we believe this test is valid — live-verified against this fixture's own bytes (this worktree's `validation/.venv`, OCP/OCCT 7.8.1). Default read → shape_null=False, 1 face, 4 edges; `BRep_Tool::Surface(face)` is a `Geom_BSplineSurface` whose `IsUClosed()`, `IsVClosed()`, `IsUPeriodic()` and `IsVPeriodic()` all return **False** (asserted live, not assumed), and all four edges carry pcurves on it. Feeding the read shape to `BRepBuilderAPI_Sewing(1e-2)` and calling `Perform()` MERGES the two seam-line edges: `NbContigousEdges()==1`, `NbMultipleEdges()==0`, 4 unique edges → 3, and `ContigousEdgeCouple(1)` names exactly the two sections `[(1,0,2),(1,0,0)]` and `[(1.0001,0,2),(1.0001,0,0)]` — the u=umin and u=umax seam lines, averaged to x=1.00005. Both belong to the SAME face, so that merge is gated: `FindCandidates` computes `isOK = !Faces1.Contains(Face2)` and, when false, defers to `IsMergedClosed`, whose first act is `if (!isUClosed && !isVClosed) return Standard_False` with both flags coming from `IsUClosedSurface`/`IsVClosedSurface`. Since the surface itself reports neither U- nor V-closed, the merge can only have been approved through the isoparametric-curve fallback inside those two methods. Two controls from the same generator confirm the sensitivity: with the pole gap set to 0 (columns exactly coincident) OCCT hands back a U-PERIODIC surface (`IsUClosed()==True`), so the fallback is bypassed entirely — which is precisely why the 1e-4 gap has to be there; with the wrap reduced 360°→180° (a genuinely open patch, seam lines 2 apart) `NbContigousEdges()==0` and nothing merges. Sewing is not on the default STEP read path, so the merge itself requires the sewing scaffold to observe; the closure-flag facts are observable directly from the default read. Synonyms: "surface closed within tolerance but not flagged closed", "seam merge without periodic flag STEP", "IsClosedByIsos isoparametric closure fallback", "bspline pole gap seam sewing", "effectively closed surface seam pair merge".

Expected validation

occt=shape(1)/shape(1) gmsh=shape(9) ifc=schema_n/a

Byte assertions

Tier-3 assertions

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* Gs204: B_SPLINE_SURFACE_WITH_KNOTS (degree 1x1, 12-sided prism, r=1, h=2) wrapping the full 360 degrees but whose LAST pole column is the first column displaced radially by 1e-4 instead of identical to it -- 1000x the 1e-7 pole-comparison tolerance, so the surface reports NOT closed in U while being geometrically closed. One ADVANCED_FACE on it carries two distinct, unshared, 1e-4-apart vertical seam-line edges (u=umin and u=umax), a same-face seam-merge candidate pair whose approval depends entirely on detecting the surface's closure without a closure flag to read */
3HEADER;
4FILE_DESCRIPTION(('Gs204'),'2;1');
5FILE_NAME('Gs204.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','','');
6FILE_SCHEMA(('AP242_MANAGED_MODEL_BASED_3D_ENGINEERING_MIM_LF { 1 0 10303 442 1 1 4 }'));
7ENDSEC;
8DATA;
9#9000=APPLICATION_CONTEXT('mechanical design');
10#1=CARTESIAN_POINT('',(1.0,0.0,0.0));
11#2=CARTESIAN_POINT('',(1.0,0.0,2.0));
12#3=CARTESIAN_POINT('',(0.866025403784,0.5,0.0));
13#4=CARTESIAN_POINT('',(0.866025403784,0.5,2.0));
14#5=CARTESIAN_POINT('',(0.5,0.866025403784,0.0));
15#6=CARTESIAN_POINT('',(0.5,0.866025403784,2.0));
16#7=CARTESIAN_POINT('',(0.0,1.0,0.0));
17#8=CARTESIAN_POINT('',(0.0,1.0,2.0));
18#9=CARTESIAN_POINT('',(-0.5,0.866025403784,0.0));
19#10=CARTESIAN_POINT('',(-0.5,0.866025403784,2.0));
20#11=CARTESIAN_POINT('',(-0.866025403784,0.5,0.0));
21#12=CARTESIAN_POINT('',(-0.866025403784,0.5,2.0));
22#13=CARTESIAN_POINT('',(-1.0,0.0,0.0));
23#14=CARTESIAN_POINT('',(-1.0,0.0,2.0));
24#15=CARTESIAN_POINT('',(-0.866025403784,-0.5,0.0));
25#16=CARTESIAN_POINT('',(-0.866025403784,-0.5,2.0));
26#17=CARTESIAN_POINT('',(-0.5,-0.866025403784,0.0));
27#18=CARTESIAN_POINT('',(-0.5,-0.866025403784,2.0));
28#19=CARTESIAN_POINT('',(0.0,-1.0,0.0));
29#20=CARTESIAN_POINT('',(0.0,-1.0,2.0));
30#21=CARTESIAN_POINT('',(0.5,-0.866025403784,0.0));
31#22=CARTESIAN_POINT('',(0.5,-0.866025403784,2.0));
32#23=CARTESIAN_POINT('',(0.866025403784,-0.5,0.0));
33#24=CARTESIAN_POINT('',(0.866025403784,-0.5,2.0));
34#25=CARTESIAN_POINT('',(1.0001,0.0,0.0));
35#26=CARTESIAN_POINT('',(1.0001,0.0,2.0));
36#27=B_SPLINE_SURFACE_WITH_KNOTS('',1,1,((#1,#2),(#3,#4),(#5,#6),(#7,#8),(#9,#10),(#11,#12),(#13,#14),(#15,#16),(#17,#18),(#19,#20),(#21,#22),(#23,#24),(#25,#26)),.UNSPECIFIED.,.T.,.F.,.F.,(2,1,1,1,1,1,1,1,1,1,1,1,2),(2,2),(0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0),(0.0,1.0),.UNSPECIFIED.);
37#28=CARTESIAN_POINT('',(1.0,0.0,0.0));
38#29=VERTEX_POINT('',#28);
39#30=CARTESIAN_POINT('',(1.0,0.0,2.0));
40#31=VERTEX_POINT('',#30);
41#32=CARTESIAN_POINT('',(1.0001,0.0,0.0));
42#33=VERTEX_POINT('',#32);
43#34=CARTESIAN_POINT('',(1.0001,0.0,2.0));
44#35=VERTEX_POINT('',#34);
45#36=CARTESIAN_POINT('',(1.0,0.0,0.0));
46#37=CARTESIAN_POINT('',(0.866025403784,0.5,0.0));
47#38=CARTESIAN_POINT('',(0.5,0.866025403784,0.0));
48#39=CARTESIAN_POINT('',(0.0,1.0,0.0));
49#40=CARTESIAN_POINT('',(-0.5,0.866025403784,0.0));
50#41=CARTESIAN_POINT('',(-0.866025403784,0.5,0.0));
51#42=CARTESIAN_POINT('',(-1.0,0.0,0.0));
52#43=CARTESIAN_POINT('',(-0.866025403784,-0.5,0.0));
53#44=CARTESIAN_POINT('',(-0.5,-0.866025403784,0.0));
54#45=CARTESIAN_POINT('',(0.0,-1.0,0.0));
55#46=CARTESIAN_POINT('',(0.5,-0.866025403784,0.0));
56#47=CARTESIAN_POINT('',(0.866025403784,-0.5,0.0));
57#48=CARTESIAN_POINT('',(1.0001,0.0,0.0));
58#49=B_SPLINE_CURVE_WITH_KNOTS('',1,(#36,#37,#38,#39,#40,#41,#42,#43,#44,#45,#46,#47,#48),.UNSPECIFIED.,.F.,.F.,(2,1,1,1,1,1,1,1,1,1,1,1,2),(0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0),.UNSPECIFIED.);
59#50=CARTESIAN_POINT('',(1.0,0.0,2.0));
60#51=CARTESIAN_POINT('',(0.866025403784,0.5,2.0));
61#52=CARTESIAN_POINT('',(0.5,0.866025403784,2.0));
62#53=CARTESIAN_POINT('',(0.0,1.0,2.0));
63#54=CARTESIAN_POINT('',(-0.5,0.866025403784,2.0));
64#55=CARTESIAN_POINT('',(-0.866025403784,0.5,2.0));
65#56=CARTESIAN_POINT('',(-1.0,0.0,2.0));
66#57=CARTESIAN_POINT('',(-0.866025403784,-0.5,2.0));
67#58=CARTESIAN_POINT('',(-0.5,-0.866025403784,2.0));
68#59=CARTESIAN_POINT('',(0.0,-1.0,2.0));
69#60=CARTESIAN_POINT('',(0.5,-0.866025403784,2.0));
70#61=CARTESIAN_POINT('',(0.866025403784,-0.5,2.0));
71#62=CARTESIAN_POINT('',(1.0001,0.0,2.0));
72#63=B_SPLINE_CURVE_WITH_KNOTS('',1,(#50,#51,#52,#53,#54,#55,#56,#57,#58,#59,#60,#61,#62),.UNSPECIFIED.,.F.,.F.,(2,1,1,1,1,1,1,1,1,1,1,1,2),(0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0),.UNSPECIFIED.);
73#64=EDGE_CURVE('',#29,#33,#49,.T.);
74#65=EDGE_CURVE('',#31,#35,#63,.T.);
75#66=CARTESIAN_POINT('',(1.0,0.0,0.0));
76#67=DIRECTION('',(0.0,0.0,1.0));
77#68=VECTOR('',#67,2.0);
78#69=LINE('',#66,#68);
79#70=EDGE_CURVE('',#29,#31,#69,.T.);
80#71=CARTESIAN_POINT('',(1.0001,0.0,2.0));
81#72=DIRECTION('',(0.0,0.0,-1.0));
82#73=VECTOR('',#72,2.0);
83#74=LINE('',#71,#73);
84#75=EDGE_CURVE('',#35,#33,#74,.T.);
85#76=ORIENTED_EDGE('',$,$,#64,.T.);
86#77=ORIENTED_EDGE('',$,$,#75,.F.);
87#78=ORIENTED_EDGE('',$,$,#65,.F.);
88#79=ORIENTED_EDGE('',$,$,#70,.F.);
89#80=EDGE_LOOP('',(#76,#77,#78,#79));
90#81=FACE_OUTER_BOUND('',#80,.T.);
91#82=ADVANCED_FACE('',(#81),#27,.T.);
92#83=OPEN_SHELL('gs204_isoline_closure_fallback_shell',(#82));
93#84=SHELL_BASED_SURFACE_MODEL('',(#83));
94#9050=PRODUCT_CONTEXT('',#9000,'mechanical');
95#9051=PRODUCT('Gs204','Gs204','',(#9050));
96#9052=PRODUCT_DEFINITION_FORMATION('','',#9051);
97#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design');
98#9054=PRODUCT_DEFINITION('','','',#9052,#9053);
99#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054);
100#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
101#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
102#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
103#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value','');
104#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D'));
105#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#84),#9060);
106#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061);
107ENDSEC;
108END-ISO-10303-21;