step-examples/12-2a-pcurves/Gp001.stp
Sources
- 05-occt-shapefix.md F005
- 14-brlcad-rhino.md K014
- 19-datasets.md D025 (FreeCAD #5783)
Sender
STEP exporters in 3D-only mode; IGES BRep round-trips; Multiboard parts library
Description
An `EDGE_CURVE` bounding a face has only its 3D curve populated; no parametric (pcurve) representation accompanies the edge on its host surface. Many writers strip pcurves entirely or fail to compute them per-face. Receivers that assume every edge-on-face has a pcurve dereference null and crash; receivers that tolerate the absence must reconstruct the pcurve by projecting the 3D curve onto the surface.
Reproducer recipe
`EDGE_CURVE` references a 3D `LINE`/`B_SPLINE_CURVE_WITH_KNOTS` and bounds an `ADVANCED_FACE`; the corresponding `SURFACE_CURVE.associated_geometry` lacks any `PCURVE` entry. With STEP writer flag "Write out curves in parametric space of surface" enabled but no cached pcurve.
Expected kernel behavior
synthesise the missing pcurve by projecting the 3D curve onto the host surface, or reject the input as malformed. Never dereference a null pcurve handle.
Notes
Cross-oracle: pure-Python Part-21 validator accepts (`accept`); OCCT crashes (`signal(11)`). The crash is on the kernel side; the file is spec-conformant Part-21.
Expected validation
occt=signal(11)/signal(11) gmsh=signal(11) ifc=schema_n/a
Byte assertions
contains(b'SURFACE_CURVE')contains(b'EDGE_CURVE')contains(b'PCURVE')
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* Gp001 - Missing pcurve on edge (FixAddPCurve) 3 * Defect: SURFACE_CURVE.associated_geometry list is empty - no PCURVE present. 4 * The edge bounds an ADVANCED_FACE on a CYLINDRICAL_SURFACE but only the 5 * 3D curve is referenced; the parametric (u,v) curve is missing entirely. */ 6HEADER; 7FILE_DESCRIPTION(('Gp001 test case','Missing pcurve on edge (FixAddPCurve)'),'2;1'); 8FILE_NAME('Gp001.stp','2026-04-27T00:00:00',(''),(''),'auto-generated','',''); 9FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 1 1 1 1 }')); 10ENDSEC; 11DATA; 12#1=APPLICATION_CONTEXT('automotive_design'); 13#2=APPLICATION_PROTOCOL_DEFINITION('international standard','automotive_design',2000,#1); 14#10=CARTESIAN_POINT('',(0.0,0.0,0.0)); 15#11=DIRECTION('',(0.0,0.0,1.0)); 16#12=DIRECTION('',(1.0,0.0,0.0)); 17#13=AXIS2_PLACEMENT_3D('',#10,#11,#12); 18/* Cylindrical surface, radius 10 */ 19#20=CYLINDRICAL_SURFACE('',#13,10.0); 20/* 3D curve along the cylinder generator at u=0 */ 21#30=CARTESIAN_POINT('',(10.0,0.0,0.0)); 22#31=DIRECTION('',(0.0,0.0,1.0)); 23#32=VECTOR('',#31,1.0); 24#33=LINE('',#30,#32); 25/* Two vertex points top/bottom of generator */ 26#40=CARTESIAN_POINT('',(10.0,0.0,0.0)); 27#41=VERTEX_POINT('',#40); 28#42=CARTESIAN_POINT('',(10.0,0.0,5.0)); 29#43=VERTEX_POINT('',#42); 30/* Defect: SURFACE_CURVE associated_geometry is EMPTY - missing pcurve */ 31#50=SURFACE_CURVE('',#33,(),.PCURVE_S1.); 32#60=EDGE_CURVE('',#41,#43,#50,.T.); 33#61=ORIENTED_EDGE('',*,*,#60,.T.); 34#62=EDGE_LOOP('',(#61)); 35#63=FACE_OUTER_BOUND('',#62,.T.); 36#64=ADVANCED_FACE('',(#63),#20,.T.); 37ENDSEC; 38END-ISO-10303-21;