M061 — Scaling-factor encoded as non-unit DIRECTION ratios in AXIS2_PLACEMENT_3D / ITEM_DEFINED_TRANSFORMATION skipped on write

§12.8 (sub-class: assembly transformation scale)

P1 — silent data loss

assembly

Sources

Sender

deduced — OCCT uncovered-class sweep

Description

A child component's placement transformation includes a non-unit scale factor; typically encoded as DIRECTION ratios with magnitude != 1.0 (e.g., `(2.0, 0.0, 0.0)`) inside an AXIS2_PLACEMENT_3D or ITEM_DEFINED_TRANSFORMATION. The writer drops the scale silently because STEP placements canonically have no scale and DIRECTION should be normalized. The exported file represents the child at the wrong size. Bug-reporter language: "scale factor lost on write", "STEP doesn't preserve scale", "exported assembly wrong size", "non-unit DIRECTION encodes hidden scale".

Reproducer recipe

An assembly where a child's AXIS2_PLACEMENT_3D references DIRECTION entities with non-unit ratios (e.g., (2.0, 0.0, 0.0) and (0.0, 2.0, 0.0)) implicitly encoding scale 2.0; on write, the scale silently becomes 1.0.

Expected kernel behavior

Bake the scale into the child's geometry before write; or reject the assembly with a "scale not representable" diagnostic.

Notes

Synonyms: "scale dropped", "AXIS2_PLACEMENT scale lost", "non-unit DIRECTION scale stripped", "ITEM_DEFINED_TRANSFORMATION ignored scale".

Expected validation

occt=shape(1)/shape(1) gmsh=shape(3) 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/* M061: GEOMETRIC_CURVE_SET in file with AXIS2_PLACEMENT_3D referencing DIRECTION entities with non-unit magnitude (2.0,0.0,0.0) — hidden scale factor that STEP writers silently strip on write; input: AP242 STEP assembly file where a child component's AXIS2_PLACEMENT_3D uses DIRECTION('not_unit_length',(2.0,0.0,0.0)) and DIRECTION('not_unit_length',(0.0,2.0,0.0)) implicitly encoding scale 2.0; STEP placements have no canonical scale attribute; the DIRECTION magnitude is not a standardised scale encoding but some tools exploit it; AP242 ISO 10303-42 §4.4 states DIRECTION values should be normalised; on write, the writer normalises the DIRECTION to unit length and the scale is silently lost — the exported child appears at the wrong size; kernel must reject non-unit DIRECTION in AXIS2_PLACEMENT_3D; or bake the scale factor into child geometry before write; OCC silently accepts (no diagnostic, empty result); GEOMETRIC_CURVE_SET IS the model entity — OCC yields empty; synonyms: scale dropped, AXIS2_PLACEMENT scale lost, non-unit DIRECTION scale stripped, ITEM_DEFINED_TRANSFORMATION ignored scale */
3HEADER;
4FILE_DESCRIPTION(('M061'),'2;1');
5FILE_NAME('M061.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','','');
6FILE_SCHEMA(('AP242_MANAGED_MODEL_BASED_3D_ENGINEERING_MIM_LF { 1 0 10303 442 1 1 4 }'));
7ENDSEC;
8DATA;
9#9000=APPLICATION_CONTEXT('mechanical design');
10#1=CARTESIAN_POINT('child_origin',(0.,0.,0.));
11#2=DIRECTION('not_unit_length',(2.0,0.0,0.0));
12#3=DIRECTION('not_unit_length',(0.0,2.0,0.0));
13#4=AXIS2_PLACEMENT_3D('scaled_child_placement',#1,#2,#3);
14#5=CARTESIAN_POINT('parent_origin',(0.,0.,0.));
15#6=DIRECTION('z_axis',(0.,0.,1.));
16#7=DIRECTION('x_axis',(1.,0.,0.));
17#8=AXIS2_PLACEMENT_3D('parent_placement',#5,#6,#7);
18#9=ITEM_DEFINED_TRANSFORMATION('scale2x','implicit scale by 2',#8,#4);
19#10=CARTESIAN_POINT('box_a',(0.,0.,0.));
20#11=CARTESIAN_POINT('box_b',(1.,0.,0.));
21#12=CARTESIAN_POINT('box_c',(0.,1.,0.));
22#13=GEOMETRIC_CURVE_SET('non-unit-direction-encodes-hidden-scale-in-placement',(#4,#2,#3,#9,#10,#11,#12));
23#9050=PRODUCT_CONTEXT('',#9000,'mechanical');
24#9051=PRODUCT('M061','M061','',(#9050));
25#9052=PRODUCT_DEFINITION_FORMATION('','',#9051);
26#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design');
27#9054=PRODUCT_DEFINITION('','','',#9052,#9053);
28#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054);
29#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
30#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
31#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
32#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value','');
33#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D'));
34#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#13),#9060);
35#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061);
36ENDSEC;
37END-ISO-10303-21;