step-examples/12-2a-pcurves/Gp040.stp
Sources
- OCCT MANTIS#0025654
- bug-reporter language: "disable writing pcurves to STEP and IGES by default", "pcurves and 3D curves disagree on round-trip", "writer-emitted pcurves cause downstream failures". (OCCT MANTIS tracker 502 as of 2026-05-02)
Sender
OCCT's STEP writer when configured to emit pcurves (`write.surfacecurve.mode = 1`).
Description
When pcurves are emitted alongside 3D curves on `EDGE_CURVE`, every receiver re-projects them to verify consistency. The writer's pcurve, computed by a separate pass after the 3D curve is fixed, often disagrees with the 3D curve at the edge tolerance; a re-import yields edges that drift off the surface, faces with `BRepCheck_InvalidEdgeOnSurface` errors, or sewing failures. The community workaround is to disable pcurve emission entirely; the kernel-side bug is that the two representations are not co-fitted.
Reproducer recipe
STEP file with `SURFACE_CURVE` carrying both a 3D curve and a `PCURVE` whose 2D parametric curve evaluates ~ε off the 3D curve when projected onto the surface. Receiver reports edge-on-surface tolerance violation.
Expected kernel behavior
heal-and-accept; pcurves must be co-fitted with the 3D curve so that surface-evaluated pcurve and 3D curve agree within the edge tolerance; if they cannot be fitted, omit the pcurve and let the receiver re-project.
Notes
**See also**: Gp028, Tfa023. Synonyms: "STEP writer pcurves disagree with 3D curves", "disable writing pcurves to STEP and IGES by default", "edge tolerance violated by writer pcurve", "pcurve drift after STEP round-trip".
Expected validation
occt=shape(1)/shape(1) gmsh=shape(9) ifc=schema_n/a
Byte assertions
contains(b'PCURVE')contains(b'SURFACE_CURVE')
Tier-3 assertions
shape_null == False
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/* Gp040: SURFACE_CURVE on bottom edge: 3D LINE at y=0, but PCURVE starts at V=0.1 â a 0.1 mm drift far beyond edge tolerance 0.001 mm; writer-emitted PCURVE contradicts the 3D curve; receiver must detect BRepCheck_InvalidEdgeOnSurface and heal */ 3HEADER; 4FILE_DESCRIPTION(('Gp040'),'2;1'); 5FILE_NAME('Gp040.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=PLANE('',#4); 15#6=(GEOMETRIC_REPRESENTATION_CONTEXT(2)PARAMETRIC_REPRESENTATION_CONTEXT()REPRESENTATION_CONTEXT('UV','2D')); 16#7=CARTESIAN_POINT('',(0.0,0.0,0.0)); 17#8=CARTESIAN_POINT('',(10.0,0.0,0.0)); 18#9=CARTESIAN_POINT('',(10.0,5.0,0.0)); 19#10=CARTESIAN_POINT('',(0.0,5.0,0.0)); 20#11=VERTEX_POINT('',#7); 21#12=VERTEX_POINT('',#8); 22#13=VERTEX_POINT('',#9); 23#14=VERTEX_POINT('',#10); 24#15=DIRECTION('',(1.0,0.0,0.0)); 25#16=VECTOR('',#15,10.0); 26#17=LINE('',#7,#16); 27#18=CARTESIAN_POINT('',(0.0,0.1)); 28#19=DIRECTION('',(1.0,0.0)); 29#20=VECTOR('',#19,10.0); 30#21=LINE('',#18,#20); 31#22=DEFINITIONAL_REPRESENTATION('pc_bot',(#21),#6); 32#23=PCURVE('bot_pc',#5,#22); 33#24=SURFACE_CURVE('bottom',#17,(#23),.PCURVE_S1.); 34#25=EDGE_CURVE('bot_edge',#11,#12,#24,.T.); 35#26=DIRECTION('',(0.0,1.0,0.0)); 36#27=VECTOR('',#26,5.0); 37#28=LINE('',#8,#27); 38#29=CARTESIAN_POINT('',(10.0,0.0)); 39#30=DIRECTION('',(0.0,1.0)); 40#31=VECTOR('',#30,5.0); 41#32=LINE('',#29,#31); 42#33=DEFINITIONAL_REPRESENTATION('pc_right',(#32),#6); 43#34=PCURVE('right_pc',#5,#33); 44#35=SURFACE_CURVE('right',#28,(#34),.PCURVE_S1.); 45#36=EDGE_CURVE('right_edge',#12,#13,#35,.T.); 46#37=DIRECTION('',(-1.0,0.0,0.0)); 47#38=VECTOR('',#37,10.0); 48#39=LINE('',#9,#38); 49#40=CARTESIAN_POINT('',(10.0,5.0)); 50#41=DIRECTION('',(-1.0,0.0)); 51#42=VECTOR('',#41,10.0); 52#43=LINE('',#40,#42); 53#44=DEFINITIONAL_REPRESENTATION('pc_top',(#43),#6); 54#45=PCURVE('top_pc',#5,#44); 55#46=SURFACE_CURVE('top',#39,(#45),.PCURVE_S1.); 56#47=EDGE_CURVE('top_edge',#13,#14,#46,.T.); 57#48=DIRECTION('',(0.0,-1.0,0.0)); 58#49=VECTOR('',#48,5.0); 59#50=LINE('',#10,#49); 60#51=CARTESIAN_POINT('',(0.0,5.0)); 61#52=DIRECTION('',(0.0,-1.0)); 62#53=VECTOR('',#52,5.0); 63#54=LINE('',#51,#53); 64#55=DEFINITIONAL_REPRESENTATION('pc_left',(#54),#6); 65#56=PCURVE('left_pc',#5,#55); 66#57=SURFACE_CURVE('left',#50,(#56),.PCURVE_S1.); 67#58=EDGE_CURVE('left_edge',#14,#11,#57,.T.); 68#59=ORIENTED_EDGE('',$,$,#25,.T.); 69#60=ORIENTED_EDGE('',$,$,#36,.T.); 70#61=ORIENTED_EDGE('',$,$,#47,.T.); 71#62=ORIENTED_EDGE('',$,$,#58,.T.); 72#63=EDGE_LOOP('',(#59,#60,#61,#62)); 73#64=FACE_OUTER_BOUND('',#63,.T.); 74#65=ADVANCED_FACE('',(#64),#5,.T.); 75#66=OPEN_SHELL('',(#65)); 76#67=SHELL_BASED_SURFACE_MODEL('',(#66)); 77#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 78#9051=PRODUCT('Gp040','Gp040','',(#9050)); 79#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 80#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 81#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 82#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 83#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 84#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 85#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 86#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 87#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 88#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#67),#9060); 89#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 90ENDSEC; 91END-ISO-10303-21;