U045 — `CARTESIAN_TRANSFORMATION_OPERATOR` `scale` attribute parsed but never applied (BRL-CAD step-g)

§12.5 units & coordinate systems (sub-class: transformation operator scale ignored)

P1 — silent data loss

units

Sources

Sender

STEP producers that emit `CARTESIAN_TRANSFORMATION_OPERATOR_3D` with a non-unit `scale` attribute to convert sub-component units (e.g. inch-prototype scaled to mm by `scale = 25.4`), or that scale a per-instance copy of a shared prototype.

Description

The `Load` pass parses the optional `scale` REAL into a class member, but `LoadONBrep` is an unconditional stub: the scale never reaches the resulting `ON_Xform`/`gp_Trsf`. A producer's intent — "place this prototype at this location and scale it by k" — is silently lost; the located sub-shape arrives at unit scale, so a 1 inch prototype with `scale = 25.4` to make a 25.4 mm part stays 1 unit big. The reverse defect on the producer side is U015 / Wr050 (writer composes scale twice); this is the symmetric reader-side defect: scale dropped on the floor.

Reproducer recipe

`#100=CARTESIAN_TRANSFORMATION_OPERATOR_3D('inch_to_mm', #11, #12, #10, 25.4, #13);` referenced as a transformation between two `REPRESENTATION_RELATIONSHIP_WITH_TRANSFORMATION` representations. step-g loads but does not apply `scale`.

Expected kernel behavior

heal-and-accept; `LoadONBrep` must build a uniform-scale `ON_Xform` from the parsed `scale` value; emit `W_OPERATOR_SCALE_APPLIED` diagnostic recording the factor.

Notes

**See also**: U015, Wr050, M061. Synonyms: "CartesianTransformationOperator scale parsed but ignored", "STEP scale operator does nothing on import", "step-g LoadONBrep stub for transformation operator", "uniform scale 25.4 dropped by reader", "BRL-CAD subassembly arrives unit scale despite operator scale".

Expected validation

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

Byte assertions

Tier-3 assertions

Cross-references

U015, Wr050, M061

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* U045: CARTESIAN_TRANSFORMATION_OPERATOR_3D scale=25.4 (inch->mm conversion) */
3/* DEFECT (BRL-CAD step-g): LoadONBrep stub silently drops the scale attribute */
4/* Producer intent: place 1-unit inch prototype scaled by 25.4 to get 25.4 mm part */
5/* Buggy receiver (step-g): stub ignores scale; subassembly arrives at 1 mm (unit scale) */
6/* Correct receiver: build uniform-scale xform from parsed scale=25.4 */
7HEADER;
8FILE_DESCRIPTION(('U045: CARTESIAN_TRANSFORMATION_OPERATOR_3D scale=25.4 ignored by step-g'),'2;1');
9FILE_NAME('U045.stp','2026-06-21T00:00:00',(''),(''),'cad-research-suite','','');
10FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }'));
11ENDSEC;
12DATA;
13/* Standard mm context for assembly */
14#10=(LENGTH_UNIT() NAMED_UNIT(*) SI_UNIT(.MILLI.,.METRE.));
15#11=(NAMED_UNIT(*) PLANE_ANGLE_UNIT() SI_UNIT($,.RADIAN.));
16#12=(NAMED_UNIT(*) SI_UNIT($,.STERADIAN.) SOLID_ANGLE_UNIT());
17#13=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(0.001),#10,
18  'distance_accuracy_value','maximum model space distance between geometric entities');
19#14=(GEOMETRIC_REPRESENTATION_CONTEXT(3) GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#13))
20  GLOBAL_UNIT_ASSIGNED_CONTEXT((#10,#11,#12)) REPRESENTATION_CONTEXT('ctx','3D'));
21/* Prototype geometry: 1-unit (inch) coordinates — should become 25.4 mm after scaling */
22#1=CARTESIAN_POINT('proto_origin',(0.,0.,0.));
23#2=CARTESIAN_POINT('proto_corner_a',(1.,0.,0.));
24#3=CARTESIAN_POINT('proto_corner_b',(0.,1.,0.));
25#4=CARTESIAN_POINT('proto_corner_c',(1.,1.,1.));
26/* Prototype representation (inch-space) */
27#20=GEOMETRIC_CURVE_SET('inch_prototype',(#1,#2,#3,#4));
28#21=SHAPE_REPRESENTATION('inch_proto_rep',(#20),#14);
29/* Assembly-space axes for the CARTESIAN_TRANSFORMATION_OPERATOR_3D */
30#30=CARTESIAN_POINT('xform_origin',(0.,0.,0.));
31#31=DIRECTION('xform_axis1',(0.,0.,1.));
32#32=DIRECTION('xform_axis2',(1.,0.,0.));
33#33=CARTESIAN_POINT('xform_local_origin',(0.,0.,0.));
34#34=DIRECTION('xform_local_axis1',(0.,0.,1.));
35#35=DIRECTION('xform_local_axis2',(1.,0.,0.));
36/* CARTESIAN_TRANSFORMATION_OPERATOR_3D: inch->mm scale factor = 25.4 */
37/* BRL-CAD step-g Load() reads scale=25.4 into member variable */
38/* BRL-CAD step-g LoadONBrep() is a stub: scale is NEVER applied */
39#100=CARTESIAN_TRANSFORMATION_OPERATOR_3D('inch_to_mm',#30,#31,#32,25.4,#33,#34,#35);
40/* Assembly representation referencing the transformation */
41#110=SHAPE_REPRESENTATION('assembly_rep',(#20),#14);
42/* REPRESENTATION_RELATIONSHIP_WITH_TRANSFORMATION links the two representations */
43#120=REPRESENTATION_RELATIONSHIP_WITH_TRANSFORMATION(
44  'inch_to_mm_placement','scale 25.4 inch to mm',#21,#110,#100);
45/* Model entity is GEOMETRIC_CURVE_SET — OCC returns empty shape */
46#200=GEOMETRIC_CURVE_SET('cartesian-transform-scale-dropped',(#1,#2,#3,#4));
47ENDSEC;
48END-ISO-10303-21;