step-examples/12-4-tolerance/N004.stp
Sources
- 03-occt-tests R014
- 05-occt-shapefix F009
- 13-quaoar B018
- 09-healing-menus H057
Description
An `EDGE_CURVE` declares the same-parameter invariant (3D curve and pcurve share parameterisation, `SameParameter=.T.`), but a sampling check shows the maximum point-wise deviation exceeds the declared edge tolerance. Typical pattern: a 3D `LINE` from (0,0,0) to (10,0,0) plus a pcurve `LINE` on a `PLANE` running at v=0.005; the pcurve lifts to a curve offset by 0.005 mm from the 3D curve, but the edge tolerance is only 1e-6. The flag was set without re-validation after a geometry edit, so the metadata claims an invariant the data no longer satisfies; the same-parameter flag is true but curves disagree at sampled values.
Reproducer recipe
Build an `EDGE_CURVE` with both 3D BSpline and pcurve. Reproject the pcurve at a different sampling. Set the same-parameter flag without recomputing. Run a topology checker.
Expected kernel behavior
re-parameterise one curve so the flag is true, drop the flag and inflate edge tolerance to absorb the actual deviation, or reject as malformed. Choice is kernel-design-dependent.
Notes
**See also**: N006. Synonyms: "3D curve and pcurve disagree at sampled points", "same parameter flag is true but curves don't match", "edge claims same param but pcurve drifts off 3D", "pcurve offset from 3D curve by 5 microns", "metadata claims invariant data has lost".
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Byte assertions
contains(b'PCURVE') and contains(b'SURFACE_CURVE')contains(b'PLANE') and count_entity_def(b'EDGE_CURVE') == 1contains(b'1.0E-6')
Tier-3 assertions
shape_null == True
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/* N004: EDGE_CURVE SameParameter=.T. but pcurve on PLANE offset by 0.005 mm; edge tolerance 1.0E-6; 3D curve vs pcurve deviation 5.0E-3 >> tol; GEOMETRIC_CURVE_SET â OCC yields empty */ 3HEADER; 4FILE_DESCRIPTION(('N004'),'2;1'); 5FILE_NAME('N004.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','',''); 6FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 7ENDSEC; 8DATA; 9#1=CARTESIAN_POINT('p3d_start',(0.0,0.0,0.0)); 10#2=CARTESIAN_POINT('p3d_end',(10.0,0.0,0.0)); 11#3=VERTEX_POINT('v_start',#1); 12#4=VERTEX_POINT('v_end',#2); 13#5=DIRECTION('',(1.0,0.0,0.0)); 14#6=VECTOR('',#5,10.0); 15#7=LINE('line3d',#1,#6); 16#8=CARTESIAN_POINT('plane_orig',(0.0,0.0,0.0)); 17#9=DIRECTION('',(0.0,1.0,0.0)); 18#10=DIRECTION('',(1.0,0.0,0.0)); 19#11=AXIS2_PLACEMENT_3D('',#8,#9,#10); 20#12=PLANE('host_plane',#11); 21#13=(GEOMETRIC_REPRESENTATION_CONTEXT(2)GLOBAL_UNIT_ASSIGNED_CONTEXT($)REPRESENTATION_CONTEXT('uv_ctx','2D')); 22#14=CARTESIAN_POINT('pc_start_offset',(0.0,0.005)); 23#15=DIRECTION('',(1.0,0.0)); 24#16=VECTOR('',#15,10.0); 25#17=LINE('pc_line_offset',#14,#16); 26#18=DEFINITIONAL_REPRESENTATION('pdef',(#17),#13); 27#19=PCURVE('pc_offset',#12,#18); 28#20=SURFACE_CURVE('sc',#7,(#19),.PCURVE_S1.); 29#21=EDGE_CURVE('edge_sameparam_lie',#3,#4,#20,.T.); 30#22=GEOMETRIC_CURVE_SET('edges',(#21)); 31#23=APPLICATION_CONTEXT('automotive_design'); 32#24=PRODUCT_CONTEXT('',#23,'mechanical'); 33#25=PRODUCT('N004','N004','',(#24)); 34#26=PRODUCT_DEFINITION_FORMATION('','',#25); 35#27=PRODUCT_DEFINITION_CONTEXT('part definition',#23,'design'); 36#28=PRODUCT_DEFINITION('','',#26,#27); 37#29=PRODUCT_DEFINITION_SHAPE('','',#28); 38#30=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 39#31=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 40#32=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 41#33=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-6),#30,'distance_accuracy_value','model_precision'); 42#34=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#33))GLOBAL_UNIT_ASSIGNED_CONTEXT((#30,#31,#32))REPRESENTATION_CONTEXT('ctx','3D')); 43#35=GEOMETRICALLY_BOUNDED_WIREFRAME_SHAPE_REPRESENTATION('',(#22),#34); 44#36=SHAPE_DEFINITION_REPRESENTATION(#29,#35); 45ENDSEC; 46END-ISO-10303-21;