step-examples/12-2a-pcurves/Gp013.stp
Sources
- 04-occt-translation.md Q034 (`StepToTopoDS_GeometricTool.cxx:114-199`)
Sender
CATIA
Description
CATIA encodes a cylinder as two `FACE_SURFACE`s on the same nearly-closed (but non-periodic) `B_SPLINE_SURFACE_WITH_KNOTS`. The shared `EDGE_CURVE` stores two pcurves on the same B-spline surface — one starting at (u=0,v=0) and the other at (u=1,v=0) — like a seam edge, but the surface lacks declared periodicity. The two pcurves do not lift to the same 3D edge, so the `SURFACE_CURVE.master_representation` choice is ambiguous, generic seam handling misfires, and the translator must recognize the CATIA idiom of two-pcurves-on-one-near-closed-surface.
Reproducer recipe
Two `ADVANCED_FACE`s sharing an `EDGE_CURVE` whose `SURFACE_CURVE` contains two pcurves on a non-periodic BSpline surface whose endpoints touch within `Precision::Confusion()`.
Expected kernel behavior
heal; detect the near-periodic surface, treat it as periodic for the seam, and reconcile both pcurves.
Notes
**See also**: Gs005. **OCC behavior**: accepts and loads shape(1); OCC's STEP reader recomputes the pcurve from the 3D curve on transfer (per Gp193), so the declared 2D/pcurve defect does not survive into the built shape. Perturbing the declared defect from clean to grossly exaggerated leaves the built shape unchanged in both shape-counts and BRepCheck validity (heal_on and heal_off), so the shape-count oracle cannot distinguish it from a clean input; shape(1) does not witness a kernel bug. Synonyms: "CATIA cylinder as near-closed B-spline surface", "two pcurves on non-periodic surface acting like seam", "near-closed BSpline surface treated as cylinder", "CATIA like-seam idiom on B-spline", "shared edge with two pcurves on non-periodic surface".
Expected validation
occt=shape(1)/shape(1) gmsh=shape(6) ifc=schema_n/a
Byte assertions
contains(b'SURFACE_CURVE')contains(b'EDGE_CURVE')count_entity_def(b'PCURVE') >= 2
Tier-3 assertions
shape_null == Falsen_faces_total == 1n_edges_total == 4n_vertices_total == 8face[0].surface_type == "bspline"face[0].bspline.is_u_periodic == Trueface[0].edge_orientations.forward == 2face[0].edge_orientations.reversed == 2edge[0].curve_type == "circle"edge[0].analytic.radius == 1.0edge[2].curve_type == "circle"edge[2].analytic.radius == 1.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/* Gp013: CATIA like-seam: single EDGE_CURVE with two pcurves on non-periodic B-spline surface, used twice in a proper 4-edge face loop */ 3HEADER; 4FILE_DESCRIPTION(('Gp013'),'2;1'); 5FILE_NAME('Gp013.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('',(1.0,0.0,0.0)); 11#2=CARTESIAN_POINT('',(1.0,0.0,1.0)); 12#3=CARTESIAN_POINT('',(0.707106781187,0.707106781187,0.0)); 13#4=CARTESIAN_POINT('',(0.707106781187,0.707106781187,1.0)); 14#5=CARTESIAN_POINT('',(0.0,1.0,0.0)); 15#6=CARTESIAN_POINT('',(0.0,1.0,1.0)); 16#7=CARTESIAN_POINT('',(-0.707106781187,0.707106781187,0.0)); 17#8=CARTESIAN_POINT('',(-0.707106781187,0.707106781187,1.0)); 18#9=CARTESIAN_POINT('',(-1.0,0.0,0.0)); 19#10=CARTESIAN_POINT('',(-1.0,0.0,1.0)); 20#11=CARTESIAN_POINT('',(-0.707106781187,-0.707106781187,0.0)); 21#12=CARTESIAN_POINT('',(-0.707106781187,-0.707106781187,1.0)); 22#13=CARTESIAN_POINT('',(0.0,-1.0,0.0)); 23#14=CARTESIAN_POINT('',(0.0,-1.0,1.0)); 24#15=CARTESIAN_POINT('',(0.707106781187,-0.707106781187,0.0)); 25#16=CARTESIAN_POINT('',(0.707106781187,-0.707106781187,1.0)); 26#17=CARTESIAN_POINT('',(1.0,0.0,0.0)); 27#18=CARTESIAN_POINT('',(1.0,0.0,1.0)); 28#19=B_SPLINE_SURFACE_WITH_KNOTS('',2,1,((#1,#2),(#3,#4),(#5,#6),(#7,#8),(#9,#10),(#11,#12),(#13,#14),(#15,#16),(#17,#18)),.UNSPECIFIED.,.F.,.F.,.F.,(3,1,1,1,1,1,1,3),(2,2),(0.0,0.125,0.25,0.375,0.5,0.625,0.75,1.0),(0.0,1.0),.UNSPECIFIED.); 29#20=CARTESIAN_POINT('',(1.0,0.0,0.0)); 30#21=CARTESIAN_POINT('',(1.0,0.0,1.0)); 31#22=VERTEX_POINT('',#20); 32#23=VERTEX_POINT('',#21); 33#24=(GEOMETRIC_REPRESENTATION_CONTEXT(2)PARAMETRIC_REPRESENTATION_CONTEXT()REPRESENTATION_CONTEXT('UV','2D')); 34#25=DIRECTION('',(0.0,0.0,1.0)); 35#26=VECTOR('',#25,1.0); 36#27=LINE('',#20,#26); 37#28=CARTESIAN_POINT('',(0.0,0.0)); 38#29=DIRECTION('',(0.0,1.0)); 39#30=VECTOR('',#29,1.0); 40#31=LINE('',#28,#30); 41#32=DEFINITIONAL_REPRESENTATION('pc_u0_def',(#31),#24); 42#33=PCURVE('pc_u0_bank',#19,#32); 43#34=CARTESIAN_POINT('',(1.0,0.0)); 44#35=DIRECTION('',(0.0,1.0)); 45#36=VECTOR('',#35,1.0); 46#37=LINE('',#34,#36); 47#38=DEFINITIONAL_REPRESENTATION('pc_u1_def',(#37),#24); 48#39=PCURVE('pc_u1_bank',#19,#38); 49#40=SURFACE_CURVE('catia_like_seam',#27,(#33,#39),.PCURVE_S1.); 50#41=EDGE_CURVE('seam',#22,#23,#40,.T.); 51#42=CARTESIAN_POINT('',(0.0,0.0,0.0)); 52#43=DIRECTION('',(0.0,0.0,1.0)); 53#44=DIRECTION('',(1.0,0.0,0.0)); 54#45=AXIS2_PLACEMENT_3D('',#42,#43,#44); 55#46=CIRCLE('bot_full',#45,1.0); 56#47=CARTESIAN_POINT('',(0.0,0.0)); 57#48=DIRECTION('',(1.0,0.0)); 58#49=VECTOR('',#48,1.0); 59#50=LINE('',#47,#49); 60#51=DEFINITIONAL_REPRESENTATION('pc_bot_def',(#50),#24); 61#52=PCURVE('bot_pcurve',#19,#51); 62#53=SURFACE_CURVE('bot_arc',#46,(#52),.PCURVE_S1.); 63#54=EDGE_CURVE('bot_arc',#22,#22,#53,.T.); 64#55=CARTESIAN_POINT('',(0.0,0.0,1.0)); 65#56=AXIS2_PLACEMENT_3D('',#55,#43,#44); 66#57=CIRCLE('top_full',#56,1.0); 67#58=CARTESIAN_POINT('',(0.0,1.0)); 68#59=DIRECTION('',(1.0,0.0)); 69#60=VECTOR('',#59,1.0); 70#61=LINE('',#58,#60); 71#62=DEFINITIONAL_REPRESENTATION('pc_top_def',(#61),#24); 72#63=PCURVE('top_pcurve',#19,#62); 73#64=SURFACE_CURVE('top_arc',#57,(#63),.PCURVE_S1.); 74#65=EDGE_CURVE('top_arc',#23,#23,#64,.T.); 75#66=ORIENTED_EDGE('',$,$,#54,.T.); 76#67=ORIENTED_EDGE('',$,$,#41,.T.); 77#68=ORIENTED_EDGE('',$,$,#65,.F.); 78#69=ORIENTED_EDGE('',$,$,#41,.F.); 79#70=EDGE_LOOP('',(#66,#67,#68,#69)); 80#71=FACE_OUTER_BOUND('',#70,.T.); 81#72=ADVANCED_FACE('',(#71),#19,.T.); 82#73=OPEN_SHELL('',(#72)); 83#74=SHELL_BASED_SURFACE_MODEL('',(#73)); 84#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 85#9051=PRODUCT('Gp013','Gp013','',(#9050)); 86#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 87#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 88#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 89#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 90#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 91#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 92#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 93#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 94#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 95#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#74),#9060); 96#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 97ENDSEC; 98END-ISO-10303-21;