Wr035 — Coordinate scale-factor applied twice (model 1000× larger or smaller than expected)

§12.13 writer-pathology (sub-class: unit / coordinate)

P1 — silent data loss

round-trip writer

Sources

Sender

Writers with bugs in unit-conversion: applying the m-to-mm factor in both the coordinate transform and the unit declaration

Description

Numeric coordinates are scaled by 1000 (input was in metres, internal store is in millimetres, output applied the m-to-mm factor *and* declared the unit as `MILLI METRE` while the coordinates already reflect the mm scale, so the receiver applies the factor a second time). The result: the receiver sees a model 1000× larger or smaller than intended. Bug-reporter language: "model 1000× too small after import", "STEP file scaled by 1000", "tiny model", "huge model", "millimetre-vs-metre mistake".

Reproducer recipe

a CARTESIAN_POINT at `(1000.0, 1000.0, 1000.0)` with `LENGTH_UNIT` declared as `MILLI METRE`, comment noting input was a 1.0-metre cube.

Expected kernel behavior

Heal and accept: normalize by trusting the DATA-section unit declaration. If a receiver application has a "model size sanity check" it warns when the bounding box exceeds plausible bounds, but the kernel itself does not second-guess.

Notes

§12.5 covers unit defects from receiver perspective. Provenance tier: writer-side (Q5 full-corpus 2026-07-01).

Expected validation

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

Provenance tier

writer-side — defect not fully embodied in fixture bytes.

Byte assertions

Tier-3 assertions

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes
1ISO-10303-21;
2/* Wr035: coordinate scale-factor applied twice (model 1000x too large) */
3/* Input was a 1.0-metre cube; writer applied m-to-mm (x1000) to coordinates */
4/* AND declared LENGTH_UNIT as MILLI METRE — receiver applies factor a second time */
5/* Result: receiver sees a cube 1000x larger than the producer intended */
6HEADER;
7FILE_DESCRIPTION(('Wr035: double unit-conversion scale defect'),'2;1');
8FILE_NAME('Wr035.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','','');
9FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }'));
10ENDSEC;
11DATA;
12/* DEFECT: coordinates are 1000.0 (already mm-scaled), but unit says MILLI METRE */
13/* A 1.0-metre cube should have corners at (1000.0,...) in mm — but unit declaration */
14/* already tells receiver these are mm values; receiver multiplies again => 1e6 mm */
15#1=CARTESIAN_POINT('origin',(0.,0.,0.));
16#2=CARTESIAN_POINT('corner-xxx',(1000.0,0.,0.));
17#3=CARTESIAN_POINT('corner-xxy',(1000.0,1000.0,0.));
18#4=CARTESIAN_POINT('corner-xyy',(0.,1000.0,0.));
19#5=CARTESIAN_POINT('corner-xxz',(1000.0,0.,1000.0));
20#6=CARTESIAN_POINT('corner-xyz',(1000.0,1000.0,1000.0));
21#7=DIRECTION('xdir',(1.,0.,0.));
22#8=DIRECTION('zdir',(0.,0.,1.));
23/* DEFECT: unit declared as MILLI METRE while coordinates already reflect mm-scaling */
24#9=(LENGTH_UNIT() NAMED_UNIT(*) SI_UNIT(.MILLI.,.METRE.));
25#10=GEOMETRIC_CURVE_SET('double-scaled-1m-cube',(#1,#2,#3,#4,#5,#6));
26ENDSEC;
27END-ISO-10303-21;