step-examples/12-2a-pcurves/Gp031.stp
Sources
- 05-occt-shapefix.md F063 (`ShapeBuild_Edge.cxx:647`)
Description
After an IGES BRep round-trip (or other translator path), a cylindrical face appears with two distinct but identically-defined `CYLINDRICAL_SURFACE` instances (e.g. `#20` and `#21`) where each `ADVANCED_FACE` uses one copy; analytic identity is lost. A single 3D edge then has two pcurves on these supposedly-same surfaces; duplicate surface definitions and aliased pcurves create confusion, and pcurves stored against the second copy disagree with those against the first even though geometrically identical.
Reproducer recipe
Cylindrical face → IGES BRep → re-import; check that all faces of the cylinder share the same `Geom_CylindricalSurface` handle.
Expected kernel behavior
heal; canonicalize duplicate analytic surfaces post-IGES; re-bind pcurves to the canonical surface.
Notes
**See also**: Gn023, Gp016. **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: "duplicate CYLINDRICAL_SURFACE instances after IGES BRep round-trip", "cylinder analytic identity lost", "two copies of same cylindrical surface", "duplicate analytic surfaces after IGES round-trip", "pcurves on supposedly-same cylinder disagree".
Expected validation
occt=shape(1)/shape(1) gmsh=shape(12) ifc=schema_n/a
Tier-3 assertions
face[0].surface_type == "cylinder"face[0].quadric.radius == 1.0face[1].surface_type == "cylinder"face[1].quadric.radius == 1.0edge[0].curve_type == "circle"edge[0].analytic.radius == 1.0edge[2].curve_type == "circle"edge[2].analytic.radius == 1.0shape_null == Falsen_faces_total == 2n_edges_total == 8n_vertices_total == 16
Cross-references
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes
1ISO-10303-21; 2/* Gp031: Two ADVANCED_FACEs on distinct but identically-defined CYLINDRICAL_SURFACE instances (sor1, sor2); shared split edge SURFACE_CURVE has pcurve on sor1 (u=0) and pcurve on sor2 (u=pi); duplicate analytic surface identity lost after IGES BRep round-trip; kernel must canonicalize and rebind pcurves */ 3HEADER; 4FILE_DESCRIPTION(('Gp031'),'2;1'); 5FILE_NAME('Gp031.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=CARTESIAN_POINT('',(0.0,0.0,0.0)); 16#7=DIRECTION('',(0.0,0.0,1.0)); 17#8=DIRECTION('',(1.0,0.0,0.0)); 18#9=AXIS2_PLACEMENT_3D('',#6,#7,#8); 19#10=CYLINDRICAL_SURFACE('',#9,1.0); 20#11=(GEOMETRIC_REPRESENTATION_CONTEXT(2)PARAMETRIC_REPRESENTATION_CONTEXT()REPRESENTATION_CONTEXT('UV','2D')); 21#12=CARTESIAN_POINT('',(1.0,0.0,0.0)); 22#13=CARTESIAN_POINT('',(1.0,0.0,1.0)); 23#14=CARTESIAN_POINT('',(-1.0,0.0,0.0)); 24#15=CARTESIAN_POINT('',(-1.0,0.0,1.0)); 25#16=VERTEX_POINT('',#12); 26#17=VERTEX_POINT('',#13); 27#18=VERTEX_POINT('',#14); 28#19=VERTEX_POINT('',#15); 29#20=DIRECTION('',(0.0,0.0,1.0)); 30#21=VECTOR('',#20,1.0); 31#22=LINE('',#12,#21); 32#23=CARTESIAN_POINT('',(0.0,0.0)); 33#24=DIRECTION('',(0.0,1.0)); 34#25=VECTOR('',#24,1.0); 35#26=LINE('',#23,#25); 36#27=DEFINITIONAL_REPRESENTATION('pc_right_cyl1',(#26),#11); 37#28=PCURVE('right_on_cyl1',#5,#27); 38#29=CARTESIAN_POINT('',(3.14159265359,0.0)); 39#30=DIRECTION('',(0.0,1.0)); 40#31=VECTOR('',#30,1.0); 41#32=LINE('',#29,#31); 42#33=DEFINITIONAL_REPRESENTATION('pc_right_cyl2',(#32),#11); 43#34=PCURVE('right_on_cyl2',#10,#33); 44#35=SURFACE_CURVE('right_split',#22,(#28,#34),.PCURVE_S1.); 45#36=EDGE_CURVE('right_split',#16,#17,#35,.T.); 46#37=LINE('',#14,#21); 47#38=CARTESIAN_POINT('',(3.14159265359,0.0)); 48#39=DIRECTION('',(0.0,1.0)); 49#40=VECTOR('',#39,1.0); 50#41=LINE('',#38,#40); 51#42=DEFINITIONAL_REPRESENTATION('pc_left_cyl1',(#41),#11); 52#43=PCURVE('left_on_cyl1',#5,#42); 53#44=CARTESIAN_POINT('',(0.0,0.0)); 54#45=DIRECTION('',(0.0,1.0)); 55#46=VECTOR('',#45,1.0); 56#47=LINE('',#44,#46); 57#48=DEFINITIONAL_REPRESENTATION('pc_left_cyl2',(#47),#11); 58#49=PCURVE('left_on_cyl2',#10,#48); 59#50=SURFACE_CURVE('left_split',#37,(#43,#49),.PCURVE_S1.); 60#51=EDGE_CURVE('left_split',#18,#19,#50,.T.); 61#52=CARTESIAN_POINT('',(0.0,0.0,0.0)); 62#53=DIRECTION('',(0.0,0.0,1.0)); 63#54=DIRECTION('',(1.0,0.0,0.0)); 64#55=AXIS2_PLACEMENT_3D('',#52,#53,#54); 65#56=CIRCLE('',#55,1.0); 66#57=CARTESIAN_POINT('',(0.0,0.0)); 67#58=DIRECTION('',(1.0,0.0)); 68#59=VECTOR('',#58,3.14159265359); 69#60=LINE('',#57,#59); 70#61=DEFINITIONAL_REPRESENTATION('pc_bot_front',(#60),#11); 71#62=PCURVE('bot_front',#5,#61); 72#63=SURFACE_CURVE('bot_front',#56,(#62),.PCURVE_S1.); 73#64=EDGE_CURVE('bot_front',#16,#18,#63,.T.); 74#65=CARTESIAN_POINT('',(0.0,0.0,1.0)); 75#66=AXIS2_PLACEMENT_3D('',#65,#53,#54); 76#67=CIRCLE('',#66,1.0); 77#68=CARTESIAN_POINT('',(0.0,1.0)); 78#69=DIRECTION('',(1.0,0.0)); 79#70=VECTOR('',#69,3.14159265359); 80#71=LINE('',#68,#70); 81#72=DEFINITIONAL_REPRESENTATION('pc_top_front',(#71),#11); 82#73=PCURVE('top_front',#5,#72); 83#74=SURFACE_CURVE('top_front',#67,(#73),.PCURVE_S1.); 84#75=EDGE_CURVE('top_front',#17,#19,#74,.T.); 85#76=ORIENTED_EDGE('',$,$,#64,.T.); 86#77=ORIENTED_EDGE('',$,$,#51,.T.); 87#78=ORIENTED_EDGE('',$,$,#75,.F.); 88#79=ORIENTED_EDGE('',$,$,#36,.F.); 89#80=EDGE_LOOP('',(#76,#77,#78,#79)); 90#81=FACE_OUTER_BOUND('',#80,.T.); 91#82=ADVANCED_FACE('',(#81),#5,.T.); 92#83=CIRCLE('',#55,1.0); 93#84=CARTESIAN_POINT('',(0.0,0.0)); 94#85=DIRECTION('',(1.0,0.0)); 95#86=VECTOR('',#85,3.14159265359); 96#87=LINE('',#84,#86); 97#88=DEFINITIONAL_REPRESENTATION('pc_bot_back',(#87),#11); 98#89=PCURVE('bot_back',#10,#88); 99#90=SURFACE_CURVE('bot_back',#83,(#89),.PCURVE_S1.); 100#91=EDGE_CURVE('bot_back',#18,#16,#90,.T.); 101#92=CIRCLE('',#66,1.0); 102#93=CARTESIAN_POINT('',(0.0,1.0)); 103#94=DIRECTION('',(1.0,0.0)); 104#95=VECTOR('',#94,3.14159265359); 105#96=LINE('',#93,#95); 106#97=DEFINITIONAL_REPRESENTATION('pc_top_back',(#96),#11); 107#98=PCURVE('top_back',#10,#97); 108#99=SURFACE_CURVE('top_back',#92,(#98),.PCURVE_S1.); 109#100=EDGE_CURVE('top_back',#19,#17,#99,.T.); 110#101=ORIENTED_EDGE('',$,$,#91,.T.); 111#102=ORIENTED_EDGE('',$,$,#36,.T.); 112#103=ORIENTED_EDGE('',$,$,#100,.F.); 113#104=ORIENTED_EDGE('',$,$,#51,.F.); 114#105=EDGE_LOOP('',(#101,#102,#103,#104)); 115#106=FACE_OUTER_BOUND('',#105,.T.); 116#107=ADVANCED_FACE('',(#106),#10,.T.); 117#108=OPEN_SHELL('',(#82,#107)); 118#109=SHELL_BASED_SURFACE_MODEL('',(#108)); 119#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 120#9051=PRODUCT('Gp031','Gp031','',(#9050)); 121#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 122#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 123#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 124#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 125#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 126#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 127#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 128#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 129#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 130#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#109),#9060); 131#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 132ENDSEC; 133END-ISO-10303-21;