U052 — `REPRESENTATION_CONTEXT` of the wrong kind (missing unit mixins) directly governing a live shell

§12.5 units (sub-class: representation context of unusable kind)

P1 — silent data loss

units

Sources

Sender

deduced — OCCT uncovered-class sweep

Description

The sibling of U051. Here `context_of_items` is **not** null — it references a real, present `REPRESENTATION_CONTEXT('wrong_kind_ctx','3D')` entity — but that entity is the plain, non-complex EXPRESS type, lacking the `GeometricRepresentationContext`+`GlobalUnitAssignedContext` mixins every correctly-formed STEP unit context carries. `PrepareUnits` does not hit the null-context "Bad RepresentationContext" branch (the context is present), but its `IsKind(GeometricRepresentationContextAndGlobalUnitAssignedContext)` check fails for both complex-type variants, so `theGUAC` stays null: the `ComputeFactors` unit-factor block is silently skipped entirely (no warning is even emitted for that part), and the uncertainty/precision default path fires (`"No Length Uncertainty, value of read.precision.val is taken"`). The reader still returns a live, correctly-topologized shell.

Reproducer recipe

`SHAPE_REPRESENTATION('wrong_kind_shape',(#shell),#ctx)` where `#ctx=REPRESENTATION_CONTEXT('wrong_kind_ctx','3D')` (the bare, non-complex form) and `#shell` is a real `SHELL_BASED_SURFACE_MODEL`, wrapped by a normal product chain.

Expected kernel behavior

reject as malformed (a `SHAPE_REPRESENTATION` whose context lacks unit declarations is spec-illegal), or warn loudly and require explicit user confirmation of the assumed unit, rather than silently defaulting.

Notes

**See also**: U051 (sibling subvariant: context slot literally `$`/absent, not merely wrong-kind), M063. Provenance tier: bytes-sufficient. Synonyms: "STEP no units defaulted", "kernel guessed units", "representation context of unusable kind", "bare RepresentationContext missing unit mixins", "GeometricRepresentationContextAndGlobalUnitAssignedContext kind check fails".

Expected validation

occt=shape(1)/shape(1) gmsh=shape(9) ifc=schema_n/a

Byte assertions

Tier-3 assertions

Cross-references

U051, M063

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* U052: REPRESENTATION_CONTEXT of the wrong kind (missing unit mixins), directly governing a live shell */
3/* DEFECT: theRepCont is present but neither GeometricRepresentationContextAndGlobalUnitAssignedContext */
4/* nor the +GlobalUncertaintyAssignedContext complex kind -- theGUAC stays Null, units silently default */
5/* Byte assertion: literal form SHAPE_REPRESENTATION('wrong_kind_shape',(#N),#M) */
6HEADER;
7FILE_DESCRIPTION(('U052: wrong-kind REPRESENTATION_CONTEXT on a live shell'),'2;1');
8FILE_NAME('U052.stp','2026-07-12T00:00:00',(''),(''),'cad-research-suite','','');
9FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }'));
10ENDSEC;
11DATA;
12#1=CARTESIAN_POINT('',(0.0,0.0,0.0));
13#2=DIRECTION('',(0.0,0.0,1.0));
14#3=DIRECTION('',(1.0,0.0,0.0));
15#4=AXIS2_PLACEMENT_3D('',#1,#2,#3);
16#5=PLANE('',#4);
17#6=CARTESIAN_POINT('',(0.0,0.0,0.0));
18#7=CARTESIAN_POINT('',(1.0,0.0,0.0));
19#8=CARTESIAN_POINT('',(1.0,1.0,0.0));
20#9=CARTESIAN_POINT('',(0.0,1.0,0.0));
21#10=VERTEX_POINT('',#6);
22#11=VERTEX_POINT('',#7);
23#12=VERTEX_POINT('',#8);
24#13=VERTEX_POINT('',#9);
25#14=DIRECTION('',(1.0,0.0,0.0));
26#15=VECTOR('',#14,1.0);
27#16=LINE('',#6,#15);
28#17=EDGE_CURVE('',#10,#11,#16,.T.);
29#18=DIRECTION('',(0.0,1.0,0.0));
30#19=VECTOR('',#18,1.0);
31#20=LINE('',#7,#19);
32#21=EDGE_CURVE('',#11,#12,#20,.T.);
33#22=DIRECTION('',(-1.0,0.0,0.0));
34#23=VECTOR('',#22,1.0);
35#24=LINE('',#8,#23);
36#25=EDGE_CURVE('',#12,#13,#24,.T.);
37#26=DIRECTION('',(0.0,-1.0,0.0));
38#27=VECTOR('',#26,1.0);
39#28=LINE('',#9,#27);
40#29=EDGE_CURVE('',#13,#10,#28,.T.);
41#30=ORIENTED_EDGE('',$,$,#17,.T.);
42#31=ORIENTED_EDGE('',$,$,#21,.T.);
43#32=ORIENTED_EDGE('',$,$,#25,.T.);
44#33=ORIENTED_EDGE('',$,$,#29,.T.);
45#34=EDGE_LOOP('',(#30,#31,#32,#33));
46#35=FACE_OUTER_BOUND('',#34,.T.);
47#36=ADVANCED_FACE('',(#35),#5,.T.);
48#37=OPEN_SHELL('',(#36));
49#38=SHELL_BASED_SURFACE_MODEL('',(#37));
50#100=APPLICATION_CONTEXT('mechanical design');
51#101=PRODUCT_CONTEXT('',#100,'mechanical');
52#102=PRODUCT('U052','U052','',(#101));
53#103=PRODUCT_DEFINITION_FORMATION('','',#102);
54#104=PRODUCT_DEFINITION_CONTEXT('part definition',#100,'design');
55#105=PRODUCT_DEFINITION('','',#103,#104);
56#106=PRODUCT_DEFINITION_SHAPE('','',#105);
57/* DEFECT: bare REPRESENTATION_CONTEXT -- present but missing GeometricRepresentationContext + */
58/* GlobalUnitAssignedContext mixins -- 'wrong kind' for PrepareUnits's complex-type dispatch */
59#99=REPRESENTATION_CONTEXT('wrong_kind_ctx','3D');
60#107=SHAPE_REPRESENTATION('wrong_kind_shape',(#38),#99);
61#108=SHAPE_DEFINITION_REPRESENTATION(#106,#107);
62ENDSEC;
63END-ISO-10303-21;