step-examples/12-2a-pcurves/Gp018.stp
Sources
- 08-occt-gitlog.md G095 (Mantis 0032557)
Description
Converting a periodic surface (cylinder, torus) into an explicit `B_SPLINE_SURFACE_WITH_KNOTS` yields a non-periodic NURBS whose parametric domain does not exactly match the original. Pcurves whose endpoints landed cleanly on the period boundary end up with small gaps at the wrap-around: typically two pcurves on the same 3D edge end up nearly coincident (e.g. one at u=0 and the other at u=0.999, within 0.001 in U) but not identical; nearly-duplicate pcurves on the same edge straddling the converted seam.
Reproducer recipe
Apply a periodic-surface-to-NURBS conversion to a face on a `CYLINDRICAL_SURFACE`; check pcurve endpoints' UV against the new BSpline surface's UV bounds.
Expected kernel behavior
adjust pcurve domain to match the converted surface (segmenting where needed) so the wraparound gap is bridged, or reject the converted result as a fidelity loss.
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: "nearly-duplicate pcurves at converted seam", "small UV gap after periodic-to-NURBS conversion", "pcurve gap near wraparound", "two pcurves on same edge after BSpline conversion", "periodic surface converted to NURBS leaves seam pcurve mismatch".
Expected validation
occt=shape(1)/shape(1) gmsh=shape(3) ifc=schema_n/a
Tier-3 assertions
shape_null == Falsen_faces_total == 1n_edges_total == 1n_vertices_total == 2face[0].surface_type == "bspline"face[0].bspline.is_u_periodic == True
Cross-references
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes
1ISO-10303-21; 2/* Gp018: Two nearly-duplicate pcurves (u=0.0 and u=0.999) on same non-periodic B-spline surface after periodic-to-NURBS conversion: UV gap 0.001 */ 3HEADER; 4FILE_DESCRIPTION(('Gp018'),'2;1'); 5FILE_NAME('Gp018.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('',(1.0,0.0,0.0)); 11#2=CARTESIAN_POINT('',(1.0,0.0,1.0)); 12#3=CARTESIAN_POINT('',(0.707106781187,0.707106781187,0.0)); 13#4=CARTESIAN_POINT('',(0.707106781187,0.707106781187,1.0)); 14#5=CARTESIAN_POINT('',(0.0,1.0,0.0)); 15#6=CARTESIAN_POINT('',(0.0,1.0,1.0)); 16#7=CARTESIAN_POINT('',(-0.707106781187,0.707106781187,0.0)); 17#8=CARTESIAN_POINT('',(-0.707106781187,0.707106781187,1.0)); 18#9=CARTESIAN_POINT('',(-1.0,0.0,0.0)); 19#10=CARTESIAN_POINT('',(-1.0,0.0,1.0)); 20#11=CARTESIAN_POINT('',(-0.707106781187,-0.707106781187,0.0)); 21#12=CARTESIAN_POINT('',(-0.707106781187,-0.707106781187,1.0)); 22#13=CARTESIAN_POINT('',(0.0,-1.0,0.0)); 23#14=CARTESIAN_POINT('',(0.0,-1.0,1.0)); 24#15=CARTESIAN_POINT('',(0.707106781187,-0.707106781187,0.0)); 25#16=CARTESIAN_POINT('',(0.707106781187,-0.707106781187,1.0)); 26#17=CARTESIAN_POINT('',(1.0,0.0,0.0)); 27#18=CARTESIAN_POINT('',(1.0,0.0,1.0)); 28#19=B_SPLINE_SURFACE_WITH_KNOTS('',2,1,((#1,#2),(#3,#4),(#5,#6),(#7,#8),(#9,#10),(#11,#12),(#13,#14),(#15,#16),(#17,#18)),.UNSPECIFIED.,.F.,.F.,.F.,(3,1,1,1,1,1,1,3),(2,2),(0.0,0.125,0.25,0.375,0.5,0.625,0.75,1.0),(0.0,1.0),.UNSPECIFIED.); 29#20=CARTESIAN_POINT('',(1.0,0.0,0.0)); 30#21=CARTESIAN_POINT('',(1.0,0.0,1.0)); 31#22=VERTEX_POINT('',#20); 32#23=VERTEX_POINT('',#21); 33#24=DIRECTION('',(0.0,0.0,1.0)); 34#25=VECTOR('',#24,1.0); 35#26=LINE('',#20,#25); 36#27=(GEOMETRIC_REPRESENTATION_CONTEXT(2)PARAMETRIC_REPRESENTATION_CONTEXT()REPRESENTATION_CONTEXT('UV','2D')); 37#28=CARTESIAN_POINT('',(0.0,0.0)); 38#29=DIRECTION('',(0.0,1.0)); 39#30=VECTOR('',#29,1.0); 40#31=LINE('',#28,#30); 41#32=DEFINITIONAL_REPRESENTATION('pc_u0',(#31),#27); 42#33=PCURVE('bank_u0',#19,#32); 43#34=CARTESIAN_POINT('',(0.999,0.0)); 44#35=DIRECTION('',(0.0,1.0)); 45#36=VECTOR('',#35,1.0); 46#37=LINE('',#34,#36); 47#38=DEFINITIONAL_REPRESENTATION('pc_u1_near_dup',(#37),#27); 48#39=PCURVE('bank_u0999',#19,#38); 49#40=SURFACE_CURVE('seam_converted',#26,(#33,#39),.PCURVE_S1.); 50#41=EDGE_CURVE('seam',#22,#23,#40,.T.); 51#42=ORIENTED_EDGE('',$,$,#41,.T.); 52#43=EDGE_LOOP('',(#42)); 53#44=FACE_OUTER_BOUND('',#43,.T.); 54#45=ADVANCED_FACE('',(#44),#19,.T.); 55#46=OPEN_SHELL('',(#45)); 56#47=SHELL_BASED_SURFACE_MODEL('',(#46)); 57#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 58#9051=PRODUCT('Gp018','Gp018','',(#9050)); 59#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 60#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 61#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 62#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 63#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 64#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 65#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 66#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 67#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 68#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#47),#9060); 69#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 70ENDSEC; 71END-ISO-10303-21;