Tb022 — Tolerance declared in different units than coordinates

§12.4 (sub-class: tolerance-unit mismatch)

P1 — silent data loss

units

Sources

Description

A file's `LENGTH_UNIT` declared in `GEOMETRIC_REPRESENTATION_CONTEXT` is `.MILLI.METRE.` (mm). The `UNCERTAINTY_MEASURE_WITH_UNIT` uses a *different* inline `LENGTH_UNIT` of `.METRE.` (m), with value 1e-6 — that is, 1e-6 m = 1e-3 mm. A kernel that interprets the uncertainty in the context's units (mm) reads "1e-6 mm = 1 nm — hyper-precise". A kernel that follows the uncertainty's own attached unit reads "1e-6 m = 1 µm = 1000× looser". The receiver's policy on which unit binding to follow determines a 1000× difference in working tolerance — every other defect in this section becomes a different defect class.

Reproducer recipe

Two `LENGTH_UNIT` records — one bound to the `GEOMETRIC_REPRESENTATION_CONTEXT` (mm), one bound to the `UNCERTAINTY_MEASURE_WITH_UNIT` (m). Coordinates in mm.

Expected kernel behavior

Heal and accept: normalize the unit-binding policy for tolerance per spec; each `UNCERTAINTY_MEASURE_WITH_UNIT` carries its own unit, and receivers convert / coerce before comparing to coordinates.

Notes

**See also**: U001. Searchable as "tolerance in wrong units",. Synonyms: "tolerance in different unit from coordinates", "uncertainty unit doesn't match length unit", "tolerance specified in mm but coordinates in m", "unit mismatch between tolerance and geometry". "STEP file 1000× too tight or too loose".

Expected validation

occt=empty/empty gmsh=empty ifc=schema_n/a

Byte assertions

Tier-3 assertions

Cross-references

U001

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* Tb022: UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-6)) bound to .METRE. unit while context length unit is .MILLI.METRE.; kernel reading in context mm: 1e-6 mm hyper-precise; kernel following own unit binding: 1e-6 m = 1 um — 1000x looser; GEOMETRIC_CURVE_SET — OCC yields empty */
3HEADER;
4FILE_DESCRIPTION(('Tb022'),'2;1');
5FILE_NAME('Tb022.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('e',#3,#4,#7,.T.);
17#9=GEOMETRIC_CURVE_SET('cs',(#8));
18#10=APPLICATION_CONTEXT('automotive_design');
19#11=PRODUCT_CONTEXT('',#10,'mechanical');
20#12=PRODUCT('Tb022','Tb022','',(#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=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT($,.METRE.));
29#21=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-6),#20,'distance_accuracy_value','tolerance_in_metres_not_context_mm');
30#22=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#21))GLOBAL_UNIT_ASSIGNED_CONTEXT((#17,#18,#19))REPRESENTATION_CONTEXT('ctx_mm_with_metre_uncertainty','3D'));
31#23=GEOMETRICALLY_BOUNDED_WIREFRAME_SHAPE_REPRESENTATION('',(#9),#22);
32#24=SHAPE_DEFINITION_REPRESENTATION(#16,#23);
33ENDSEC;
34END-ISO-10303-21;