U002 — Onshape always emits METRE; NX rescales as if mm (1000× too small)

§12.5 (sub-class: wrong-declaration / producer-side fixed unit)

P1 — silent data loss

units

Sources

Sender

Onshape STEP writer

Description

Onshape always emits length unit `.METRE.` regardless of workspace display unit. NX accepts only inch or millimetre and silently treats metric STEP as mm, yielding a 1000× too-small body.

Reproducer recipe

`SI_UNIT($, .METRE.)` (no prefix) with coordinate magnitudes appropriate for metres; consume in NX configured for mm.

Expected kernel behavior

Heal and accept: read the declared length unit verbatim; never assume; if the display unit differs, normalize / scale internally.

Notes

**See also**: U001. Synonyms: "Onshape STEP comes in 1000x too small in NX", "Onshape always emits METRE", "NX reads metres as mm", "STEP metres misread as mm", "metric STEP 1000x smaller in NX".

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/* U002: Onshape always emits METRE; NX treats metric STEP as mm (1000x too small) */
3/* Onshape writes SI_UNIT($,.METRE.) with no prefix regardless of workspace display unit */
4/* Coordinates are in metres: a 100x50 mm part appears as 0.1 x 0.05 m */
5/* NX silently reads metre values as mm => body is 1000x too small */
6HEADER;
7FILE_DESCRIPTION(('U002: SI_UNIT(METRE) from Onshape misread as mm by NX'),'2;1');
8FILE_NAME('U002.stp','2026-06-20T00:00:00',(''),(''),'cad-research-suite','','');
9FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }'));
10ENDSEC;
11DATA;
12/* Geometry: 100x50 mm part authored in Onshape, exported in metre coordinates */
13#1=CARTESIAN_POINT('origin',(0.,0.,0.));
14#2=CARTESIAN_POINT('corner-x',(0.1,0.,0.));
15#3=CARTESIAN_POINT('corner-y',(0.,0.05,0.));
16#4=CARTESIAN_POINT('corner-z',(0.,0.,0.025));
17#5=CARTESIAN_POINT('corner-xyz',(0.1,0.05,0.025));
18#6=DIRECTION('xdir',(1.,0.,0.));
19#7=DIRECTION('zdir',(0.,0.,1.));
20/* DEFECT: SI_UNIT($,.METRE.) — no MILLI prefix — Onshape always writes base metre */
21/* NX configured for mm silently treats 0.1 m as 0.1 mm => 1000x too small */
22#10=(LENGTH_UNIT() NAMED_UNIT(*) SI_UNIT($,.METRE.));
23#11=(NAMED_UNIT(*) PLANE_ANGLE_UNIT() SI_UNIT($,.RADIAN.));
24#12=(NAMED_UNIT(*) SI_UNIT($,.STERADIAN.) SOLID_ANGLE_UNIT());
25#13=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.E-07),#10,
26  'distance_accuracy_value','maximum model space distance between geometric entities');
27#14=(GEOMETRIC_REPRESENTATION_CONTEXT(3) GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#13))
28  GLOBAL_UNIT_ASSIGNED_CONTEXT((#10,#11,#12)) REPRESENTATION_CONTEXT('ctx','3D'));
29/* Model entity is GEOMETRIC_CURVE_SET — OCC returns empty shape */
30#20=GEOMETRIC_CURVE_SET('onshape-metre-part',(#1,#2,#3,#4,#5));
31ENDSEC;
32END-ISO-10303-21;