step-examples/12-2a-pcurves/Gp015.stp
Sources
- 04-occt-translation.md Q036 (`StepToTopoDS_TranslateEdgeLoop.cxx:716-727`)
Description
When the translator clips a `PCURVE` to the parameter range of its hosting `EDGE_CURVE`, the trim operation fails (e.g. range outside pcurve domain, or 3D-curve range maps to a U-band where pcurve is undefined). Edge construction aborts.
Reproducer recipe
`EDGE_CURVE` whose 3D-curve `[first,last]` corresponds to U=`[5,7]` of host surface, but the pcurve is defined only on U=`[0,2π]`.
Expected kernel behavior
heal; wrap parameters via period; if the surface is not periodic, reject the edge with diagnostic.
Notes
**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: "trimming of 2D curve failed", "pcurve clip to edge range fails", "edge construction aborts on pcurve trim", "2D-curve trim outside pcurve domain", "edge construction fails clipping pcurve".
Expected validation
occt=shape(1)/shape(1) gmsh=reject ifc=schema_n/a
Byte assertions
contains(b'SURFACE_CURVE')contains(b'EDGE_CURVE')count_entity_def(b'PCURVE') >= 1
Tier-3 assertions
shape_null == Falsen_faces_total == 1n_edges_total == 1n_vertices_total == 2face[0].surface_type == "cylinder"face[0].quadric.radius == 1.0
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/* Gp015: EDGE_CURVE 3D-range [0,2] exceeds PCURVE B-spline domain [0,1]: trim fails */ 3HEADER; 4FILE_DESCRIPTION(('Gp015'),'2;1'); 5FILE_NAME('Gp015.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('',(1.0,0.0,0.0)); 16#7=CARTESIAN_POINT('',(1.0,0.0,2.0)); 17#8=VERTEX_POINT('',#6); 18#9=VERTEX_POINT('',#7); 19#10=DIRECTION('',(0.0,0.0,1.0)); 20#11=VECTOR('',#10,2.0); 21#12=LINE('',#6,#11); 22#13=(GEOMETRIC_REPRESENTATION_CONTEXT(2)PARAMETRIC_REPRESENTATION_CONTEXT()REPRESENTATION_CONTEXT('UV','2D')); 23#14=CARTESIAN_POINT('',(0.0,0.0)); 24#15=CARTESIAN_POINT('',(0.0,1.0)); 25#16=B_SPLINE_CURVE_WITH_KNOTS('pcurve_domain_0_to_1',1,(#14,#15),.UNSPECIFIED.,.F.,.F.,(2,2),(0.0,1.0),.UNSPECIFIED.); 26#17=DEFINITIONAL_REPRESENTATION('pc_short',(#16),#13); 27#18=PCURVE('',#5,#17); 28#19=SURFACE_CURVE('',#12,(#18),.PCURVE_S1.); 29#20=EDGE_CURVE('',#8,#9,#19,.T.); 30#21=ORIENTED_EDGE('',$,$,#20,.T.); 31#22=EDGE_LOOP('',(#21)); 32#23=FACE_OUTER_BOUND('',#22,.T.); 33#24=ADVANCED_FACE('',(#23),#5,.T.); 34#25=OPEN_SHELL('',(#24)); 35#26=SHELL_BASED_SURFACE_MODEL('',(#25)); 36#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 37#9051=PRODUCT('Gp015','Gp015','',(#9050)); 38#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 39#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 40#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 41#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 42#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 43#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 44#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 45#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 46#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 47#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#26),#9060); 48#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 49ENDSEC; 50END-ISO-10303-21;