step-examples/12-2a-pcurves/Gp172.stp
Sources
- OCCT MANTIS#0030124 ("PCURVE.basis_surface points at wrong adjacent surface")
- B4 wave-6 DEF-EE (LGPL-clean — pattern only, no bytes copied).
Sender
STEP exporters that copy a `PCURVE` from one face to an adjacent face without updating the `basis_surface` reference; common in translation pipelines that share `SURFACE_CURVE` entities between adjacent faces but emit separate `PCURVE` slots with the wrong surface ID.
Description
STEP file with two adjacent `ADVANCED_FACE` entities: F1 on surface S1 (`PLANE`, y=0, normal +Y, the XZ plane) and F2 on surface S2 (`CYLINDRICAL_SURFACE`, radius=3, axis +Z). They share edge E: a `LINE` from (3,0,0) to (3,0,5) (lies on both y=0 and x²+y²=9). The `SURFACE_CURVE` for edge E carries two `PCURVE` entries. The pcurve for F2 correctly references S2 (cylinder). **THE DEFECT**: the pcurve for F1 (the plane) has its `basis_surface` attribute pointing to S2 (the cylindrical surface) instead of S1 (the plane). The 3D curve of E is correct. OCCT loads the shape but `brepcheck` flags it as invalid; gmsh rejects ("Could not fix wire in surface 1"); the wrong surface UV domain is used to evaluate the planar face boundary.
Reproducer recipe
Two `ADVANCED_FACE`s sharing an `EDGE_CURVE` via a `SURFACE_CURVE`; the `SURFACE_CURVE` lists two `PCURVE`s; the pcurve for the `PLANE` face encodes `PCURVE('...',#CYLINDRICAL_SURFACE,...)` (wrong `basis_surface`). OCCT: `shape(1)`, `brepcheck=False`; gmsh: reject.
Expected kernel behavior
validate `PCURVE.basis_surface` against the `ADVANCED_FACE.face_geometry` for each face that uses the edge; emit `E_PCURVE_WRONG_BASIS_SURFACE` when the surface IDs do not match; reject or warn before propagating incorrect UV bounds to downstream operations.
Notes
OCCT MANTIS 0030124. B4 wave-6 DEF-EE. Synonyms: "PCURVE basis_surface wrong surface reference", "PCURVE points at adjacent face surface", "wrong basis surface in PCURVE", "PCURVE.basis_surface mismatch", "adjacent face surface UV error pcurve".
Expected validation
occt=shape(1)/shape(1) gmsh=reject ifc=schema_n/a
Byte assertions
count_entity_def(b'ADVANCED_FACE') >= 2contains(b'PCURVE')contains(b'CYLINDRICAL_SURFACE')contains(b'PLANE')
Tier-3 assertions
shape_null == Falsen_faces_total == 2n_edges_total == 5
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* Gp172: Two adjacent ADVANCED_FACEs: F1 on PLANE (y=0, XZ plane, normal +Y) and F2 on CYLINDRICAL_SURFACE (radius=3, axis +Z); shared edge E: LINE from (3,0,0) to (3,0,5) lies on both surfaces; SURFACE_CURVE for E carries two pcurves â one for F2 (basis_surface=CYLINDRICAL_SURFACE, CORRECT) and one for F1 (THE DEFECT: basis_surface=CYLINDRICAL_SURFACE instead of PLANE); OCCT may silently miscompute UV bounds for F1 boundary; pcurve-off-surface; OCCT MANTIS 0030124; SHELL_BASED_SURFACE_MODEL IS model entity */ 3HEADER; 4FILE_DESCRIPTION(('Gp172'),'2;1'); 5FILE_NAME('Gp172.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=(GEOMETRIC_REPRESENTATION_CONTEXT(2)PARAMETRIC_REPRESENTATION_CONTEXT()REPRESENTATION_CONTEXT('UV','2D')); 11#2=CARTESIAN_POINT('',(0.0,0.0,0.0)); 12#3=DIRECTION('',(0.0,1.0,0.0)); 13#4=DIRECTION('',(1.0,0.0,0.0)); 14#5=AXIS2_PLACEMENT_3D('',#2,#3,#4); 15#6=PLANE('',#5); 16#7=CARTESIAN_POINT('',(0.0,0.0,0.0)); 17#8=DIRECTION('',(0.0,0.0,1.0)); 18#9=DIRECTION('',(1.0,0.0,0.0)); 19#10=AXIS2_PLACEMENT_3D('',#7,#8,#9); 20#11=CYLINDRICAL_SURFACE('cyl_s2',#10,3.0); 21#12=CARTESIAN_POINT('',(3.0,0.0,0.0)); 22#13=CARTESIAN_POINT('',(3.0,0.0,5.0)); 23#14=VERTEX_POINT('',#12); 24#15=VERTEX_POINT('',#13); 25#16=DIRECTION('',(0.0,0.0,1.0)); 26#17=VECTOR('',#16,5.0); 27#18=LINE('',#12,#17); 28#19=CARTESIAN_POINT('',(0.0,0.0)); 29#20=DIRECTION('',(0.0,1.0)); 30#21=VECTOR('',#20,5.0); 31#22=LINE('',#19,#21); 32#23=DEFINITIONAL_REPRESENTATION('pc_E_F2',(#22),#1); 33#24=PCURVE('pc_E_for_F2',#11,#23); 34#25=CARTESIAN_POINT('',(3.0,0.0)); 35#26=DIRECTION('',(0.0,1.0)); 36#27=VECTOR('',#26,5.0); 37#28=LINE('',#25,#27); 38#29=DEFINITIONAL_REPRESENTATION('pc_E_F1_wrong',(#28),#1); 39#30=PCURVE('pc_E_for_F1_WRONG_BASIS',#11,#29); 40#31=SURFACE_CURVE('shared_edge_E',#18,(#30,#24),.PCURVE_S1.); 41#32=EDGE_CURVE('shared_edge_E',#14,#15,#31,.T.); 42#33=CARTESIAN_POINT('',(0.0,3.0,0.0)); 43#34=CARTESIAN_POINT('',(0.0,3.0,5.0)); 44#35=VERTEX_POINT('',#33); 45#36=VERTEX_POINT('',#34); 46#37=CARTESIAN_POINT('',(0.0,0.0,0.0)); 47#38=DIRECTION('',(0.0,0.0,1.0)); 48#39=DIRECTION('',(1.0,0.0,0.0)); 49#40=AXIS2_PLACEMENT_3D('',#37,#38,#39); 50#41=CIRCLE('arc_z0',#40,3.0); 51#42=CARTESIAN_POINT('',(0.0,0.0)); 52#43=DIRECTION('',(1.0,0.0)); 53#44=VECTOR('',#43,1.57079632679); 54#45=LINE('',#42,#44); 55#46=DEFINITIONAL_REPRESENTATION('pc_az0',(#45),#1); 56#47=PCURVE('pc_az0',#11,#46); 57#48=SURFACE_CURVE('sc_az0',#41,(#47),.PCURVE_S1.); 58#49=EDGE_CURVE('ec_az0',#14,#35,#48,.T.); 59#50=CARTESIAN_POINT('',(0.0,3.0,0.0)); 60#51=DIRECTION('',(0.0,0.0,1.0)); 61#52=VECTOR('',#51,5.0); 62#53=LINE('',#50,#52); 63#54=CARTESIAN_POINT('',(1.57079632679,0.0)); 64#55=DIRECTION('',(0.0,1.0)); 65#56=VECTOR('',#55,5.0); 66#57=LINE('',#54,#56); 67#58=DEFINITIONAL_REPRESENTATION('pc_lf',(#57),#1); 68#59=PCURVE('pc_lf',#11,#58); 69#60=SURFACE_CURVE('sc_lf',#53,(#59),.PCURVE_S1.); 70#61=EDGE_CURVE('ec_lf',#35,#36,#60,.T.); 71#62=CARTESIAN_POINT('',(0.0,0.0,5.0)); 72#63=AXIS2_PLACEMENT_3D('',#62,#38,#39); 73#64=CIRCLE('arc_z5',#63,3.0); 74#65=CARTESIAN_POINT('',(0.0,5.0)); 75#66=DIRECTION('',(1.0,0.0)); 76#67=VECTOR('',#66,1.57079632679); 77#68=LINE('',#65,#67); 78#69=DEFINITIONAL_REPRESENTATION('pc_az5',(#68),#1); 79#70=PCURVE('pc_az5',#11,#69); 80#71=SURFACE_CURVE('sc_az5',#64,(#70),.PCURVE_S1.); 81#72=EDGE_CURVE('ec_az5',#15,#36,#71,.T.); 82#73=ORIENTED_EDGE('',$,$,#49,.T.); 83#74=ORIENTED_EDGE('',$,$,#61,.T.); 84#75=ORIENTED_EDGE('',$,$,#72,.F.); 85#76=ORIENTED_EDGE('',$,$,#32,.F.); 86#77=EDGE_LOOP('',(#73,#74,#75,#76)); 87#78=FACE_OUTER_BOUND('',#77,.T.); 88#79=ADVANCED_FACE('',(#78),#11,.T.); 89#80=ORIENTED_EDGE('',$,$,#32,.T.); 90#81=EDGE_LOOP('',(#80)); 91#82=FACE_OUTER_BOUND('',#81,.T.); 92#83=ADVANCED_FACE('',(#82),#6,.T.); 93#84=OPEN_SHELL('',(#83,#79)); 94#85=SHELL_BASED_SURFACE_MODEL('',(#84)); 95#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 96#9051=PRODUCT('Gp172','Gp172','',(#9050)); 97#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 98#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 99#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 100#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 101#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 102#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 103#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 104#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 105#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 106#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#85),#9060); 107#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 108ENDSEC; 109END-ISO-10303-21;