step-examples/12-4-tolerance/Tb003.stp
Sources
- synthesized time-bomb.
Description
A face declares uncertainty 1e-4 mm, an edge declares 1e-5 mm, a vertex declares 1e-6 mm — the OCCT-style invariant `tol(V) <= tol(E) <= tol(F)` holds. The receiver imports the file and internally scales coordinates from mm to m (factor 1e-3). The numeric tolerance values, if naively divided by 1000, become 1e-7, 1e-8, 1e-9 — but if the receiver also applies a working-precision floor (e.g. `max(tol, 1e-9)`), the floor flattens the small ones and inverts the hierarchy. Or the receiver may not scale tolerances at all, leaving them in source units while geometry is in target units. Same input, two different scaling policies, two different post-import hierarchies.
Reproducer recipe
A `MANIFOLD_SOLID_BREP` with three `UNCERTAINTY_MEASURE_WITH_UNIT` records (1e-6, 1e-5, 1e-4) labelled vertex/edge/face. The file's `LENGTH_UNIT` is `.MILLI.METRE.`. Receiver may rescale to `.METRE.`.
Expected kernel behavior
produce a consistent hierarchy regardless of internal unit scaling; either rescale tolerances atomically with coordinates, or document a single canonical working-unit and reject input that cannot survive the conversion.
Notes
**See also**: N001, U001. Searchable as "tolerance hierarchy. Synonyms: "tolerance hierarchy flips when scaled to meters", "uncertainty values change order under unit change", "vertex/edge/face hierarchy inverts on unit conversion", "scaling breaks tolerance ordering". violated after metric conversion", "STEP unit conversion broke tolerances".
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Byte assertions
count_entity_def(b'UNCERTAINTY_MEASURE_WITH_UNIT') == 3contains(b'1.0E-6') and contains(b'1.0E-5') and contains(b'1.0E-4')contains(b'.MILLI.')
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/* Tb003: three UNCERTAINTY_MEASURE_WITH_UNIT at 1.0E-6/1.0E-5/1.0E-4 mm; hierarchy holds in mm; rescaling to meters without atomic tolerance rescale inverts the hierarchy; OCC yields empty */ 3HEADER; 4FILE_DESCRIPTION(('Tb003'),'2;1'); 5FILE_NAME('Tb003.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('Tb003','Tb003','',(#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.0E-6),#17,'distance_accuracy_value','vertex_tol'); 29#21=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-5),#17,'distance_accuracy_value','edge_tol'); 30#22=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-4),#17,'distance_accuracy_value','face_tol'); 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;