step-examples/12-2a-pcurves/Gp066.stp
Sources
- synthesized — no external source cited
Description
ShapeFix_Edge.FixSameParameter selection-bias tolerance comparison
Reproducer recipe
Expected kernel behavior
Given an edge whose 3D curve and pcurve are visibly different curves (a degree-3 B-spline against a straight 2D line over the same parameter interval), measure the actual 3D-versus-surface deviation by sampling along the edge and set the edge tolerance to the SMALLEST value that bounds the measured deviation — not to the first candidate that merely exceeds the coincidence threshold. If the smallest bounding value exceeds the model's maximum permitted tolerance, re-project one representation from the other or reject the edge with a diagnostic; inflating tolerance to paper over a bad fit corrupts every downstream operation.
Expected validation
occt=shape(1)/shape(1) gmsh=shape(1) ifc=schema_n/a
Tier-3 assertions
shape_null == Falsen_vertices_total == 1
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes
1ISO-10303-21; 2/* Gp066: EDGE_CURVE with degree-3 B-spline 3D curve (knots 0â3) and linear PCURVE; FixSameParameter picks first-exceeds-Precision::Confusion tolerance instead of minimum feasible tolerance; suboptimal tolerance selection leaves larger-than-necessary deviation; GEOMETRIC_CURVE_SET IS model entity â OCC yields empty */ 3HEADER; 4FILE_DESCRIPTION(('Gp066'),'2;1'); 5FILE_NAME('Gp066.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=CARTESIAN_POINT('',(0.0,0.0,0.0)); 12#3=CARTESIAN_POINT('',(1.0,2.0,0.0)); 13#4=CARTESIAN_POINT('',(2.0,1.0,0.0)); 14#5=CARTESIAN_POINT('',(3.0,3.0,0.0)); 15#6=CARTESIAN_POINT('',(4.0,1.0,0.0)); 16#7=CARTESIAN_POINT('',(5.0,2.0,0.0)); 17#8=CARTESIAN_POINT('',(6.0,0.0,0.0)); 18#9=B_SPLINE_CURVE_WITH_KNOTS('spline_0_to_3',3,(#2,#3,#4,#5,#6,#7),.UNSPECIFIED.,.F.,.F.,(4,1,1,4),(0.0,1.0,2.0,3.0),.UNSPECIFIED.); 19#10=CARTESIAN_POINT('',(0.0,0.0,0.0)); 20#11=DIRECTION('',(0.0,0.0,1.0)); 21#12=DIRECTION('',(1.0,0.0,0.0)); 22#13=AXIS2_PLACEMENT_3D('',#10,#11,#12); 23#14=PLANE('',#13); 24#15=(GEOMETRIC_REPRESENTATION_CONTEXT(2)PARAMETRIC_REPRESENTATION_CONTEXT()REPRESENTATION_CONTEXT('','2D')); 25#16=CARTESIAN_POINT('',(0.0,0.0)); 26#17=DIRECTION('',(1.0,0.0)); 27#18=VECTOR('',#17,3.0); 28#19=LINE('',#16,#18); 29#20=DEFINITIONAL_REPRESENTATION('linear_pcurve',(#19),#15); 30#21=PCURVE('',#14,#20); 31#22=SURFACE_CURVE('',#9,(#21),.PCURVE_S1.); 32#23=VERTEX_POINT('',#2); 33#24=VERTEX_POINT('',#7); 34#25=EDGE_CURVE('fixsameparam_bias',#23,#24,#22,.T.); 35#26=GEOMETRIC_CURVE_SET('gcs',(#1,#25)); 36#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 37#9051=PRODUCT('Gp066','Gp066','',(#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;