step-examples/12-2a-pcurves/Gp193.stp
Sources
- Synthesized 2026-07-18 from FreeCAD-origin P014's pcurve-UV-drift claim, upgraded to a genuine face-hosted construction after live investigation (OCP/OCCT 7.8.1).
Description
An `EDGE_CURVE` bounding a real `ADVANCED_FACE` on a planar surface (P(u,v)=(u,v,0)) carries a `SURFACE_CURVE` whose sole `PCURVE` is a 2D `LINE` seeded at `(0.0, 0.5)` — v=0.5 — while the edge's 3D `LINE` genuinely lies at v=0.0 on the plane. The declared 2D parameter curve thus disagrees with the 3D geometry by 0.5 in the surface's V direction, far beyond the file's 1e-7 uncertainty. A strict "curve on surface" validator would reject this as an invalid pcurve.
Reproducer recipe
`PLANE` at origin (axis +Z, ref +X); 3D `LINE` edge (0,0,0)→(1,0,0); `PCURVE` on the plane whose 2D `LINE` seed is `(0.0, 0.5)` (drifted +0.5 in V); `SURFACE_CURVE` binding the two on one `EDGE_CURVE`; a single `ADVANCED_FACE`/`OPEN_SHELL`/`SHELL_BASED_SURFACE_MODEL`.
Expected kernel behavior
OCC's `STEPControl_Reader` discards the grossly-disagreeing declared pcurve and recomputes it from the 3D curve during transfer; the face builds cleanly with a pcurve at v=0. A strict validator instead rejects "invalid curve on surface".
Notes
**Live-verified (2026-07-18, OCP/OCCT 7.8.1)** by reading the built edge's stored curve-on-surface: the recomputed pcurve is `(0,0)→(1,0)` (v=0, matching the 3D curve — NOT the declared v=0.5), with edge tolerance unchanged at 1e-7 (no tolerance inflation). Swept declared drift v=0.5/5/50/500 — **all** recompute to v=0 with `face:1`; there is **no tolerance boundary**, and the behaviour is identical under `heal_on` (`read.surfacecurve.mode=3`) and `heal_off` (`mode=0`). So OCC's STEP reader does not trust declared pcurves at all — it recomputes every one from the 3D curve, silently correcting producer-side pcurve errors on read. **Honest scope caveat:** because OCC absorbs the drift by recompute, this file builds `face:1` *identically to a clean face* — the heal is genuine and directly verifiable (by reading the built pcurve) but is INVISIBLE to the shape-count oracles; it is not mutation-visible. Retained as a genuine, directly-verified documentation of OCC's pcurve-recompute-on-read robustness for kernel grading (a grader should confirm its kernel builds the face AND recomputes the pcurve to v=0), and as the genuine face-hosted counterpart to P014 (which is byte-level provenance only). **See also**: P014, Gp010, Gp002.
Expected validation
occt=shape(1)/shape(1) gmsh=shape(3) ifc=schema_n/a
Byte assertions
contains(b'SURFACE_CURVE')contains(b'EDGE_CURVE')count_entity_def(b'PCURVE') >= 1contains(b'(0.0,0.5)')
Tier-3 assertions
shape_null == Falsen_faces_total == 1
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/* Gp193: pcurve 2D seed drifts in V (v=0.5) from the 3D edge geometry (v=0); OCC recomputes the pcurve from the 3D curve so the face builds cleanly */ 3HEADER; 4FILE_DESCRIPTION(('Gp193'),'2;1'); 5FILE_NAME('Gp193.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=CARTESIAN_POINT('',(0.0,0.0,0.0)); 16#7=CARTESIAN_POINT('',(1.0,0.0,0.0)); 17#8=VERTEX_POINT('',#6); 18#9=VERTEX_POINT('',#7); 19#10=DIRECTION('',(1.0,0.0,0.0)); 20#11=VECTOR('',#10,1.0); 21#12=LINE('',#6,#11); 22#13=CARTESIAN_POINT('',(0.0,0.5)); 23#14=DIRECTION('',(1.0,0.0)); 24#15=VECTOR('',#14,1.0); 25#16=LINE('',#13,#15); 26#17=(GEOMETRIC_REPRESENTATION_CONTEXT(2)PARAMETRIC_REPRESENTATION_CONTEXT()REPRESENTATION_CONTEXT('','2D')); 27#18=DEFINITIONAL_REPRESENTATION('',(#16),#17); 28#19=PCURVE('',#5,#18); 29#20=SURFACE_CURVE('',#12,(#19),.PCURVE_S1.); 30#21=EDGE_CURVE('',#8,#9,#20,.T.); 31#22=ORIENTED_EDGE('',$,$,#21,.T.); 32#23=EDGE_LOOP('',(#22)); 33#24=FACE_OUTER_BOUND('',#23,.T.); 34#25=ADVANCED_FACE('',(#24),#5,.T.); 35#26=OPEN_SHELL('',(#25)); 36#27=SHELL_BASED_SURFACE_MODEL('',(#26)); 37#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 38#9051=PRODUCT('Gp193','Gp193','',(#9050)); 39#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 40#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 41#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 42#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 43#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 44#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 45#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 46#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 47#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 48#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#27),#9060); 49#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 50ENDSEC; 51END-ISO-10303-21;