step-examples/12-4-tolerance/Tb004.stp
Sources
- synthesized time-bomb.
Description
Variant of Tb003 with a non-decimal scale factor. Same hierarchy invariant in mm; the file is converted on import to inches (factor 25.4). Floating-point round-off during the multiplication leaves tolerances at unequal numbers of significant digits, and the strict hierarchy ordering may be violated by ULP-scale drift. A vertex tolerance was 1.000e-6 mm, an edge tolerance was 1.001e-6 mm; after `*25.4` they may end up `2.54e-5` and `2.54254e-5`, but with a kernel that round-trips through `float32` for some fields the equality flips.
Reproducer recipe
Three uncertainties at 1.000e-6, 1.001e-6, 1.002e-6 in mm-declared file with hierarchy invariant just barely holding; wrap in PRODUCT chain.
Expected kernel behavior
hierarchy invariant must be preserved across unit conversion; if precision is insufficient to preserve it, reject the input or widen the inflated tolerance to absorb the conversion drift, and emit a warning.
Notes
Synonyms: "tolerance hierarchy inverts under inch conversion", "non-decimal scale flips uncertainty ordering", "inch unit breaks vertex/edge tolerance ratio", "tolerance hierarchy fails after mm-to-inch conversion".
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Byte assertions
count_entity_def(b'UNCERTAINTY_MEASURE_WITH_UNIT') == 3contains(b'1.000E-6') and contains(b'1.001E-6') and contains(b'1.002E-6')
Tier-3 assertions
shape_null == True
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* Tb004: three UNCERTAINTY_MEASURE_WITH_UNIT at 1.000E-6/1.001E-6/1.002E-6 mm; hierarchy barely holds (1e-9 margin); mm->inch conversion (factor 25.4) plus float32 round-trip collapses all three, inverting strict ordering; OCC yields empty */ 3HEADER; 4FILE_DESCRIPTION(('Tb004'),'2;1'); 5FILE_NAME('Tb004.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('',(0.0,0.0,0.0)); 10#2=CARTESIAN_POINT('',(10.0,0.0,0.0)); 11#3=VERTEX_POINT('',#1); 12#4=VERTEX_POINT('',#2); 13#5=DIRECTION('',(1.0,0.0,0.0)); 14#6=VECTOR('',#5,10.0); 15#7=LINE('',#1,#6); 16#8=EDGE_CURVE('',#3,#4,#7,.T.); 17#9=GEOMETRIC_CURVE_SET('wire_set',(#8)); 18#10=APPLICATION_CONTEXT('automotive_design'); 19#11=PRODUCT_CONTEXT('',#10,'mechanical'); 20#12=PRODUCT('Tb004','Tb004','',(#11)); 21#13=PRODUCT_DEFINITION_FORMATION('','',#12); 22#14=PRODUCT_DEFINITION_CONTEXT('part definition',#10,'design'); 23#15=PRODUCT_DEFINITION('','',#13,#14); 24#16=PRODUCT_DEFINITION_SHAPE('','',#15); 25#17=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 26#18=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 27#19=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 28#20=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.000E-6),#17,'distance_accuracy_value','vertex_tol_at_ULP_floor'); 29#21=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.001E-6),#17,'distance_accuracy_value','edge_tol_one_ULP_higher'); 30#22=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.002E-6),#17,'distance_accuracy_value','face_tol_two_ULP_higher'); 31#23=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#20,#21,#22))GLOBAL_UNIT_ASSIGNED_CONTEXT((#17,#18,#19))REPRESENTATION_CONTEXT('ctx_mm','3D')); 32#24=GEOMETRICALLY_BOUNDED_WIREFRAME_SHAPE_REPRESENTATION('',(#9),#23); 33#25=SHAPE_DEFINITION_REPRESENTATION(#16,#24); 34ENDSEC; 35END-ISO-10303-21;