step-examples/12-2a-pcurves/Gp182.stp
Sources
- occt-coverage GAP audit, `tkshhealing/problems.json` `tkshh-nonperiodic-bspline-seamlike-edge` (`ShapeUpgrade_UnifySameDomain::IntUnifyFaces`, `ShapeUpgrade_UnifySameDomain.cxx:3221` detection, `:3258` `GeomConvert_ApproxSurface` for a non-B-spline base surface, `:3264`/`:3269` `SetUPeriodic`/`SetVPeriodic` on the approximated result).
Sender
Exporters that apply the CATIA-style two-pcurve seam idiom uniformly to elementary surfaces, not only B-spline approximations of them.
Description
A genuine unit cylinder (radius 1, height 1) is represented directly as a `CYLINDRICAL_SURFACE` — an elementary, non-B-spline surface type — rather than as a near-closed B-spline approximation of one (contrast Gp013/Gp181). The shared seam `EDGE_CURVE` runs the height direction at `u=0`/`u=2*pi` (both physically angle 0) and carries two pcurves on the SAME `CYLINDRICAL_SURFACE` instance — Gp013's exact "two pcurves on one surface acting like a seam" idiom, just on an elementary surface class that cannot be marked periodic in place, so a correct healer must approximate it to a B-spline surface first, before it can declare the result periodic.
Reproducer recipe
`CYLINDRICAL_SURFACE` radius 1; a shared `EDGE_CURVE` carrying two pcurves at `u=0` and `u=2*pi` on that surface, used twice (opposite orientations) in a 4-edge `FACE_OUTER_BOUND` alongside two full-circle cap edges — otherwise structurally identical to Gp013/Gp181.
Expected kernel behavior
detect the seam-like duplicate-pcurve edge on the elementary surface, approximate the surface to a B-spline, migrate the pcurves, and declare the result periodic.
Notes
**See also**: Gp013 (B-spline-host original), Gp181 (V-direction B-spline-host mirror). **OCC behavior**: silent-accept — because a `CYLINDRICAL_SURFACE` is already natively periodic in its angular direction, and this fixture is a single already-well-formed `ADVANCED_FACE` (not two faces requiring a face-unification merge pass), the file loads directly as a correct unit-cylinder-wall face without visibly exercising the approximate-then-periodize path: `shape(1)` heal on/off identical, 4 edges, 8 vertices, `face[0].surface_type == "cylinder"` (retained, not converted to a B-spline), area exactly `2*pi` (`6.283185...`, the true cylinder side area). gmsh triangulates to `shape(6)`, matching Gp013's own gmsh count. The byte-level defect (duplicate-seam-pcurve idiom on an elementary surface) is genuinely encoded; this run shows it resolved without visible drama because the single-face case doesn't require the multi-face unify pass the mechanism targets. Synonyms: "CATIA seam idiom on CYLINDRICAL_SURFACE instead of B-spline", "non-B-spline seam host requires approximation before periodicity", "two pcurves on elementary surface acting like a seam", "seam-like edge on an already-periodic analytic surface", "non-B-spline base surface periodicity approximation".
Expected validation
occt=shape(1)/shape(1) gmsh=shape(6) ifc=schema_n/a
Byte assertions
contains(b'CYLINDRICAL_SURFACE')count_entity_def(b'PCURVE') == 4count_entity_def(b'EDGE_CURVE') >= 3
Tier-3 assertions
shape_null == Falsen_faces_total == 1n_edges_total == 4n_vertices_total == 8face[0].surface_type == "cylinder"
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/* Gp182: Unit cylinder (radius 1, height 1) represented directly as a CYLINDRICAL_SURFACE (elementary, non-B-spline). The shared seam EDGE_CURVE runs the height direction at u=0/u=2*pi (both physically angle=0) and carries two pcurves on the SAME surface -- Gp013's CATIA seam idiom, but on a surface class whose Geom API cannot be marked periodic in place, forcing GeomConvert_ApproxSurface before SetUPeriodic can apply. */ 3HEADER; 4FILE_DESCRIPTION(('Gp182'),'2;1'); 5FILE_NAME('Gp182.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=CYLINDRICAL_SURFACE('',#4,1.0); 15#6=(GEOMETRIC_REPRESENTATION_CONTEXT(2)PARAMETRIC_REPRESENTATION_CONTEXT()REPRESENTATION_CONTEXT('UV','2D')); 16#7=CARTESIAN_POINT('',(1.0,0.0,0.0)); 17#8=CARTESIAN_POINT('',(1.0,0.0,1.0)); 18#9=VERTEX_POINT('',#7); 19#10=VERTEX_POINT('',#8); 20#11=DIRECTION('',(0.0,0.0,1.0)); 21#12=VECTOR('',#11,1.0); 22#13=LINE('',#7,#12); 23#14=CARTESIAN_POINT('',(0.0,0.0)); 24#15=DIRECTION('',(0.0,1.0)); 25#16=VECTOR('',#15,1.0); 26#17=LINE('',#14,#16); 27#18=DEFINITIONAL_REPRESENTATION('pc_u0_def',(#17),#6); 28#19=PCURVE('pc_u0_bank',#5,#18); 29#20=CARTESIAN_POINT('',(6.28318530718,0.0)); 30#21=DIRECTION('',(0.0,1.0)); 31#22=VECTOR('',#21,1.0); 32#23=LINE('',#20,#22); 33#24=DEFINITIONAL_REPRESENTATION('pc_u2pi_def',(#23),#6); 34#25=PCURVE('pc_u2pi_bank',#5,#24); 35#26=SURFACE_CURVE('catia_like_seam_cyl',#13,(#19,#25),.PCURVE_S1.); 36#27=EDGE_CURVE('seam',#9,#10,#26,.T.); 37#28=CARTESIAN_POINT('',(0.0,0.0,0.0)); 38#29=AXIS2_PLACEMENT_3D('',#28,#2,#3); 39#30=CIRCLE('bot_full',#29,1.0); 40#31=CARTESIAN_POINT('',(0.0,0.0)); 41#32=DIRECTION('',(1.0,0.0)); 42#33=VECTOR('',#32,6.28318530718); 43#34=LINE('',#31,#33); 44#35=DEFINITIONAL_REPRESENTATION('pc_bot_def',(#34),#6); 45#36=PCURVE('bot_pcurve',#5,#35); 46#37=SURFACE_CURVE('bot_arc',#30,(#36),.PCURVE_S1.); 47#38=EDGE_CURVE('bot_arc',#9,#9,#37,.T.); 48#39=CARTESIAN_POINT('',(0.0,0.0,1.0)); 49#40=AXIS2_PLACEMENT_3D('',#39,#2,#3); 50#41=CIRCLE('top_full',#40,1.0); 51#42=CARTESIAN_POINT('',(0.0,1.0)); 52#43=DIRECTION('',(1.0,0.0)); 53#44=VECTOR('',#43,6.28318530718); 54#45=LINE('',#42,#44); 55#46=DEFINITIONAL_REPRESENTATION('pc_top_def',(#45),#6); 56#47=PCURVE('top_pcurve',#5,#46); 57#48=SURFACE_CURVE('top_arc',#41,(#47),.PCURVE_S1.); 58#49=EDGE_CURVE('top_arc',#10,#10,#48,.T.); 59#50=ORIENTED_EDGE('',$,$,#38,.T.); 60#51=ORIENTED_EDGE('',$,$,#27,.T.); 61#52=ORIENTED_EDGE('',$,$,#49,.F.); 62#53=ORIENTED_EDGE('',$,$,#27,.F.); 63#54=EDGE_LOOP('',(#50,#51,#52,#53)); 64#55=FACE_OUTER_BOUND('',#54,.T.); 65#56=ADVANCED_FACE('',(#55),#5,.T.); 66#57=OPEN_SHELL('',(#56)); 67#58=SHELL_BASED_SURFACE_MODEL('',(#57)); 68#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 69#9051=PRODUCT('Gp182','Gp182','',(#9050)); 70#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 71#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 72#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 73#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 74#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 75#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 76#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 77#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 78#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 79#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#58),#9060); 80#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 81ENDSEC; 82END-ISO-10303-21;