step-examples/12-2c-surfaces/Gs196.stp
Sources
- OCCT `ShapeUpgrade_ClosedFaceDivide::SplitSurface` (`src/ShapeUpgrade/ShapeUpgrade_ClosedFaceDivide.cxx:161-184`, the U-closure fallback: `:168-169` `toler = GAS.UResolution(Precision())
- if((U2-U1)-(Ul-Uf) < toler)` near-full-period guard, `:170-171` builds a `Geom_RectangularTrimmedSurface` spanning exactly HALF the surface (`U1` to `(U2+U1)/2`), `:173` `if (!sast->IsUClosed(Precision()))` confirms the half is genuinely not closed before committing to the split) @ `bd2a789f15235755ce4d1a3b07379a2e062fdc2e`.
Description
A single `ADVANCED_FACE` on a `CYLINDRICAL_SURFACE` (radius 5.0) is trimmed to U:[0, 2π−1e-9] — a genuine 1e-9 radian sliver short of the full 2π period — bounded by two structurally DISTINCT (non-shared) near-coincident end edges (the u≈0 and u≈2π sides are two separate `EDGE_CURVE` entities with two separate `VERTEX_POINT`s ~5e-9 mm apart, not the same edge referenced twice), so the seam-detection scan's identity-based check never flags a seam. The gap (1e-9 rad) is below the surface adaptor's own U-direction resolution tolerance for this radius (empirically measured ≈2e-8 rad), so the face's U-trim range is within the closure-test's tolerance of the surface's full native period.
Reproducer recipe
`CYLINDRICAL_SURFACE` (radius 5.0) with a face bounded by a bottom rim (near-full circle, u:0 -> 2π−1e-9), a top rim (same, offset in Z), and two distinct straight "end" edges at u≈0 and u≈2π−1e-9 connecting them — no edge referenced twice, no `IsSeam` flag anywhere.
Expected kernel behavior
Since no seam edge is present, the closed-face splitter must fall through to the geometric-closure test; because the surface itself is unconditionally U-closed for a cylinder and the face's actual U-trim range is within resolution tolerance of the surface's full period, the implementation must build a half-surface probe patch, confirm it is NOT closed (as a genuine half necessarily is not), and split — as opposed to either skipping the near-full face entirely (leaving it unsplit) or mis-treating the thin residual sliver as itself splittable.
Notes
Live-verified directly against the closed-face split healer: raw read is 1 face (a cylinder surface, U-closed and V-open, UV bounds `(0, 2π−1e-9, 0, 3)`); after running the healer, the result is 2 faces (rectangular-trimmed patches, U-halves at the midpoint) — confirming the near-full-period thin-sliver path triggers a genuine split via the half-surface closure test, distinct from Gs193's/Gs194's explicit-seam path and Gs195's basis-curve-closed path. Fills the `tkshh-face-closed-surface-unsplit-at-seam` "face trimmed to within tolerance of a full period (thin near-closed face)" subvariant. Synonyms: "near-full-period cylindrical face no explicit seam", "RectangularTrimmedSurface half-surface closure probe", "thin sliver trim below UResolution tolerance", "geometric closure detection without seam edge", "almost-closed face forces split not skip".
Expected validation
occt=shape(1)/shape(1) gmsh=shape(7) ifc=schema_n/a
Byte assertions
contains(b'CYLINDRICAL_SURFACE')contains(b'6.283185306179586')count_entity_def(b'ADVANCED_FACE') == 1count_entity_def(b'EDGE_CURVE') == 4
Tier-3 assertions
load == "ok"shape_null == Falsen_faces_total == 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/* Gs196: single ADVANCED_FACE on a CYLINDRICAL_SURFACE (radius 5.0) trimmed to U:[0, 2pi-1e-9] -- a genuine 1e-9 radian sliver short of the full period, bounded by two DISTINCT (non-shared) near-coincident end edges, so no seam edge exists. ShapeUpgrade_ClosedFaceDivide::SplitSurface's seam scan finds nothing; the geometric-closure fallback sees mySurf->IsUClosed()==True (cylinder is always U-closed) and (U2-U1)-(Ul-Uf)=1e-9 which is below GeomAdaptor_Surface::UResolution(Precision::Confusion()) (~2e-8 rad for this radius), so it builds a half-period Geom_RectangularTrimmedSurface and confirms that half is NOT closed, forcing the split -- live-verified via ShapeUpgrade_ShapeDivideClosed: 1 face -> 2 faces, split at the U midpoint */ 3HEADER; 4FILE_DESCRIPTION(('Gs196'),'2;1'); 5FILE_NAME('Gs196.stp','2026-07-13T00: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('gs196_cyl_ax',#1,#2,#3); 14#5=CYLINDRICAL_SURFACE('gs196_cyl',#4,5.0); 15#6=(GEOMETRIC_REPRESENTATION_CONTEXT(2)PARAMETRIC_REPRESENTATION_CONTEXT()REPRESENTATION_CONTEXT('UV','2D')); 16#7=CARTESIAN_POINT('',(5.0,0.0,0.0)); 17#8=VERTEX_POINT('',#7); 18#9=CARTESIAN_POINT('',(5.0,-5.000001638348654E-09,0.0)); 19#10=VERTEX_POINT('',#9); 20#11=CARTESIAN_POINT('',(5.0,0.0,3.0)); 21#12=VERTEX_POINT('',#11); 22#13=CARTESIAN_POINT('',(5.0,-5.000001638348654E-09,3.0)); 23#14=VERTEX_POINT('',#13); 24/* bottom rim: V8(u=0) -> V10(u=Ul), almost-full circle at z=0 */ 25#15=CIRCLE('gs196_bottom_3d',#4,5.0); 26#16=CARTESIAN_POINT('',(0.0,0.0)); 27#17=DIRECTION('',(1.0,0.0)); 28#18=VECTOR('',#17,6.283185306179586); 29#19=LINE('',#16,#18); 30#20=DEFINITIONAL_REPRESENTATION('bottom_pcdef',(#19),#6); 31#21=PCURVE('bottom_pc',#5,#20); 32#22=SURFACE_CURVE('bottom_sc',#15,(#21),.PCURVE_S1.); 33#23=EDGE_CURVE('gs196_bottom_rim',#8,#10,#22,.T.); 34/* top rim: V12(u=0) -> V14(u=Ul), almost-full circle at z=3 */ 35#24=CARTESIAN_POINT('',(0.0,0.0,3.0)); 36#25=AXIS2_PLACEMENT_3D('',#24,#2,#3); 37#26=CIRCLE('gs196_top_3d',#25,5.0); 38#27=CARTESIAN_POINT('',(0.0,3.0)); 39#28=DIRECTION('',(1.0,0.0)); 40#29=VECTOR('',#28,6.283185306179586); 41#30=LINE('',#27,#29); 42#31=DEFINITIONAL_REPRESENTATION('top_pcdef',(#30),#6); 43#32=PCURVE('top_pc',#5,#31); 44#33=SURFACE_CURVE('top_sc',#26,(#32),.PCURVE_S1.); 45#34=EDGE_CURVE('gs196_top_rim',#12,#14,#33,.T.); 46/* end edge at u=Ul (near-full side): V10 -> V14 */ 47#35=DIRECTION('',(0.0,0.0,1.0)); 48#36=VECTOR('',#35,3.0); 49#37=LINE('',#9,#36); 50#38=CARTESIAN_POINT('',(6.283185306179586,0.0)); 51#39=DIRECTION('',(0.0,1.0)); 52#40=VECTOR('',#39,3.0); 53#41=LINE('',#38,#40); 54#42=DEFINITIONAL_REPRESENTATION('endUl_pcdef',(#41),#6); 55#43=PCURVE('endUl_pc',#5,#42); 56#44=SURFACE_CURVE('endUl_sc',#37,(#43),.PCURVE_S1.); 57#45=EDGE_CURVE('gs196_end_Ul',#10,#14,#44,.T.); 58/* end edge at u=0: V8 -> V12 */ 59#46=DIRECTION('',(0.0,0.0,1.0)); 60#47=VECTOR('',#46,3.0); 61#48=LINE('',#7,#47); 62#49=CARTESIAN_POINT('',(0.0,0.0)); 63#50=DIRECTION('',(0.0,1.0)); 64#51=VECTOR('',#50,3.0); 65#52=LINE('',#49,#51); 66#53=DEFINITIONAL_REPRESENTATION('end0_pcdef',(#52),#6); 67#54=PCURVE('end0_pc',#5,#53); 68#55=SURFACE_CURVE('end0_sc',#48,(#54),.PCURVE_S1.); 69#56=EDGE_CURVE('gs196_end_0',#8,#12,#55,.T.); 70#57=ORIENTED_EDGE('',$,$,#23,.T.); 71#58=ORIENTED_EDGE('',$,$,#45,.T.); 72#59=ORIENTED_EDGE('',$,$,#34,.F.); 73#60=ORIENTED_EDGE('',$,$,#56,.F.); 74#61=EDGE_LOOP('',(#57,#58,#59,#60)); 75#62=FACE_OUTER_BOUND('',#61,.T.); 76#63=ADVANCED_FACE('',(#62),#5,.T.); 77#64=OPEN_SHELL('',(#63)); 78#65=SHELL_BASED_SURFACE_MODEL('',(#64)); 79#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 80#9051=PRODUCT('Gs196','Gs196','',(#9050)); 81#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 82#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 83#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 84#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 85#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 86#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 87#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 88#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 89#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 90#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#65),#9060); 91#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 92ENDSEC; 93END-ISO-10303-21;