U005 — Plant 3D exports STEP whose `LENGTH_UNIT` context disagrees with authored drawing units (sub-mm coordinates in mm context)

§12.5 (sub-class: wrong-declaration / producer-side label drift)

units

Sources

Sender

AutoCAD Plant 3D

Description

Models authored in Plant 3D export to STEP with a `LENGTH_UNIT` context whose declared unit does not match drawing units, so external receivers see mismatched scale. Typical signature: `LENGTH_UNIT` declared as millimetres with `UNCERTAINTY_MEASURE_WITH_UNIT` 0.001 mm, but coordinates of 1.0 and 2.5; a sub-millimetre or unscaled inch fragment sitting in a mm context.

Reproducer recipe

Expected kernel behavior

writer must emit unit context tied to authored model; producer pipeline must not silently change unit context between authoring and serialization.

Notes

**OCC behavior**: silently consumes the mismatched mm-context file as written without surfacing a unit-vs-coordinate-magnitude inconsistency; the catalog claim above is producer-side, but on the read side OCC's lack of sanity-check is the kernel mishandling. Synonyms: "Plant 3D STEP unit context disagrees with drawing", "sub-mm coords in mm STEP context", "Plant 3D unit mismatch", "AutoCAD Plant 3D wrong STEP units", "drawing units differ from STEP unit".

Expected validation

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

Byte assertions

Tier-3 assertions

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* U005: Plant 3D STEP LENGTH_UNIT context disagrees with authored drawing units */
3/* AutoCAD Plant 3D serializes LENGTH_UNIT as mm but model drawing units are inches */
4/* Coordinates 1.0 and 2.5 are raw inch values; a mm context implies 25.4 and 63.5 */
5/* Receivers see mismatched scale — a sub-mm part or an unscaled inch fragment */
6HEADER;
7FILE_DESCRIPTION(('U005: Plant 3D LENGTH_UNIT mm context with inch-scale coordinates'),'2;1');
8FILE_NAME('U005.stp','2026-06-20T00:00:00',(''),(''),'cad-research-suite','','');
9FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }'));
10ENDSEC;
11DATA;
12/* Geometry: coordinates 1.0 and 2.5 are raw inch values sitting in an mm context */
13/* If mm, these are sub-millimetre fragments; authored intent was 1 in and 2.5 in */
14#1=CARTESIAN_POINT('origin',(0.,0.,0.));
15#2=CARTESIAN_POINT('corner-x',(1.0,0.,0.));
16#3=CARTESIAN_POINT('corner-y',(0.,2.5,0.));
17#4=CARTESIAN_POINT('corner-z',(0.,0.,1.0));
18#5=CARTESIAN_POINT('corner-xyz',(1.0,2.5,1.0));
19#6=DIRECTION('xdir',(1.,0.,0.));
20#7=DIRECTION('zdir',(0.,0.,1.));
21/* DEFECT: SI_UNIT(.MILLI.,.METRE.) declared but coordinates 1.0/2.5 are inch values */
22/* Plant 3D serializer changed unit context without rescaling the coordinate values */
23#10=(LENGTH_UNIT() NAMED_UNIT(*) SI_UNIT(.MILLI.,.METRE.));
24#11=(NAMED_UNIT(*) PLANE_ANGLE_UNIT() SI_UNIT($,.RADIAN.));
25#12=(NAMED_UNIT(*) SI_UNIT($,.STERADIAN.) SOLID_ANGLE_UNIT());
26#13=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(0.001),#10,
27  'distance_accuracy_value','maximum model space distance between geometric entities');
28#14=(GEOMETRIC_REPRESENTATION_CONTEXT(3) GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#13))
29  GLOBAL_UNIT_ASSIGNED_CONTEXT((#10,#11,#12)) REPRESENTATION_CONTEXT('ctx','3D'));
30/* Model entity is GEOMETRIC_CURVE_SET — OCC returns empty shape */
31#20=GEOMETRIC_CURVE_SET('plant3d-mm-context-inch-coords',(#1,#2,#3,#4,#5));
32ENDSEC;
33END-ISO-10303-21;