step-examples/12-5-units/U022.stp
Sources
- 06-nist-sfa.md S032 (sfa-dimtol.tcl:205)
Description
The conventional name is `'INCH'`; producers sometimes write `'inch'`, `'IN'`, or `'inches'` on the `name` attribute of `CONVERSION_BASED_UNIT`, breaking case-sensitive lookup tables.
Reproducer recipe
`CONVERSION_BASED_UNIT('inches', #lmwu)`.
Expected kernel behavior
Warn and accept: emit a warning; normalize the case-insensitive match against the canonical set `{INCH, FOOT, MILLIMETRE, MILLIMETER, METER, METRE, MIL, MICROINCH}`; resolve via `dimensional_exponents` rather than `name` text.
Notes
**See also**: Pmi067. Synonyms: "INCH lowercase in CONVERSION_BASED_UNIT", "STEP inch spelled as 'inch' or 'IN'", "case-sensitive inch lookup fails", "'inches' in CONVERSION_BASED_UNIT name", "STEP unit name wrong case".
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Byte assertions
contains(b"'inch'") or contains(b"'IN'") or contains(b"'inches'")count(b"CONVERSION_BASED_UNIT(") >= 2
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/* U022: INCH name misspelled as 'inches', 'inch', 'IN' on CONVERSION_BASED_UNIT */ 3/* Canonical name is 'INCH' (uppercase); these variants break case-sensitive lookup */ 4/* Kernel must normalize case-insensitively or resolve via dimensional_exponents */ 5HEADER; 6FILE_DESCRIPTION(('U022: INCH spelled as inch/IN/inches in CONVERSION_BASED_UNIT'),'2;1'); 7FILE_NAME('U022.stp','2026-06-20T00:00:00',(''),(''),'cad-research-suite','',''); 8FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 9ENDSEC; 10DATA; 11/* Geometry: simple part with 1-inch coordinates (values in mm = 25.4) */ 12#1=CARTESIAN_POINT('origin',(0.,0.,0.)); 13#2=CARTESIAN_POINT('corner-x',(25.4,0.,0.)); 14#3=CARTESIAN_POINT('corner-y',(0.,25.4,0.)); 15#4=CARTESIAN_POINT('corner-z',(0.,0.,12.7)); 16#5=CARTESIAN_POINT('corner-xyz',(25.4,25.4,12.7)); 17/* SI mm basis */ 18#8=(LENGTH_UNIT() NAMED_UNIT(*) SI_UNIT(.MILLI.,.METRE.)); 19/* Three misspelled inch CONVERSION_BASED_UNIT instances */ 20#9=LENGTH_MEASURE_WITH_UNIT(LENGTH_MEASURE(25.4),#8); 21/* DEFECT: 'inches' â wrong name, should be 'INCH' */ 22#10=(CONVERSION_BASED_UNIT('inches',#9) LENGTH_UNIT() NAMED_UNIT(*)); 23#30=LENGTH_MEASURE_WITH_UNIT(LENGTH_MEASURE(25.4),#8); 24/* DEFECT: 'inch' â lowercase, should be 'INCH' */ 25#31=(CONVERSION_BASED_UNIT('inch',#30) LENGTH_UNIT() NAMED_UNIT(*)); 26#32=LENGTH_MEASURE_WITH_UNIT(LENGTH_MEASURE(25.4),#8); 27/* DEFECT: 'IN' â abbreviated, should be 'INCH' */ 28#33=(CONVERSION_BASED_UNIT('IN',#32) LENGTH_UNIT() NAMED_UNIT(*)); 29#11=(NAMED_UNIT(*) PLANE_ANGLE_UNIT() SI_UNIT($,.RADIAN.)); 30#12=(NAMED_UNIT(*) SI_UNIT($,.STERADIAN.) SOLID_ANGLE_UNIT()); 31#13=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(0.0254),#8, 32 'distance_accuracy_value','maximum model space distance between geometric entities'); 33/* GRC uses 'inches' (the first misspelled unit) */ 34#14=(GEOMETRIC_REPRESENTATION_CONTEXT(3) GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#13)) 35 GLOBAL_UNIT_ASSIGNED_CONTEXT((#10,#11,#12)) REPRESENTATION_CONTEXT('ctx','3D')); 36/* Model entity is GEOMETRIC_CURVE_SET â OCC returns empty shape */ 37#20=GEOMETRIC_CURVE_SET('inch-unit-name-misspelled',(#1,#2,#3,#4,#5)); 38ENDSEC; 39END-ISO-10303-21;