U051 — `SHAPE_REPRESENTATION.context_of_items = $` (null) directly governing a live shell

§12.5 units (sub-class: no unit context reachable through the graph)

P1 — silent data loss

units

Sources

Sender

deduced — OCCT uncovered-class sweep

Description

A `SHAPE_REPRESENTATION` whose 4th attribute (`context_of_items`) is `$` (null) directly wraps a live `ADVANCED_FACE`/`OPEN_SHELL`/`SHELL_BASED_SURFACE_MODEL` — a genuine `GeometricRepresentationItem` chain, not a `GEOMETRIC_CURVE_SET` escape hatch. `PrepareUnits` calls `rep->ContextOfItems()`, gets a null handle, warns `"Bad RepresentationContext, default unit taken"`, and calls `ResetUnits` — the reader silently substitutes default units and still returns a live, non-null shape. Fixes M063's gap: M063's no-unit `SHAPE_REPRESENTATION` sits inside a `GEOMETRIC_CURVE_SET`, which is not a `GeometricRepresentationItem` — `StepToTopoDS`'s item-dispatch silently type-skips it, so M063's `shape(1)` actually comes from an *outer*, correctly-unitted representation, and the no-unit-context fallback never runs live (`COVERED_FULL_REVERIFY.md` downgraded this class COVERED→GAP for exactly that reason).

Reproducer recipe

`SHAPE_REPRESENTATION('no_context_shape',(#shell),$)` where `#shell` is a real `SHELL_BASED_SURFACE_MODEL`, wrapped by a normal `PRODUCT_DEFINITION` → `PRODUCT_DEFINITION_SHAPE` → `SHAPE_DEFINITION_REPRESENTATION` chain (needed for the entity to be a live `TransferRoots()` root at all — see Notes).

Expected kernel behavior

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

Notes

Root-reachability finding (live-verified 2026-07-12, OCP 7.8.1, direct `STEPControl_Reader`/`Interface_ShareFlags` probing — not mirrored/guessed): a completely bare, unreferenced `FACE_SURFACE`/`SHELL_BASED_SURFACE_MODEL`/`MAPPED_ITEM`/`CONTEXT_DEPENDENT_SHAPE_REPRESENTATION` with **no** enclosing `PRODUCT_DEFINITION` anywhere in the file does **not** get picked up by `TransferRoots()` at all in this OCCT build (`NbRootsForTransfer()==0` even though `STEPControl_ActorRead::Recognize()` textually accepts these types) — confirmed directly against `STEPControl_ActorRead::Recognize`, not assumed. This means the work-packet's most literal framing of this item ("a standalone `FaceSurface` entity requested for isolated transfer with no reachable `SHAPE_REPRESENTATION` at all") is not constructible as a fixture that actually reaches `StepToTopoDS` in this OCCT version — M063 itself already needed an enclosing `PRODUCT` chain to be reachable at all. This fixture instead builds the closest true-to-mechanism, live-reachable alternative: a normal product chain whose `SHAPE_REPRESENTATION` itself has `context_of_items=$`, the literal condition `PrepareUnits` checks for. **See also**: U052 (sibling subvariant: context present but wrong kind), M063. Provenance tier: bytes-sufficient. Synonyms: "STEP no units defaulted", "kernel guessed units", "model 1000x wrong", "SHAPE_REPRESENTATION context_of_items null", "Bad RepresentationContext default unit taken", "no unit context reachable through the graph".

Expected validation

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

Byte assertions

Tier-3 assertions

Cross-references

U052, 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/* U051: SHAPE_REPRESENTATION.context_of_items = $ (null), directly governing a live shell */
3/* DEFECT: PrepareUnits's rep->ContextOfItems().IsNull() branch fires -- */
4/* 'Bad RepresentationContext, default unit taken' -- reader silently defaults units */
5/* and still returns a live, non-null shape (not a GEOMETRIC_CURVE_SET type-skip like M063) */
6/* Byte assertion: literal form SHAPE_REPRESENTATION('no_context_shape',(#N),$) */
7HEADER;
8FILE_DESCRIPTION(('U051: SHAPE_REPRESENTATION with null context_of_items on a live shell'),'2;1');
9FILE_NAME('U051.stp','2026-07-12T00:00:00',(''),(''),'cad-research-suite','','');
10FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }'));
11ENDSEC;
12DATA;
13#1=CARTESIAN_POINT('',(0.0,0.0,0.0));
14#2=DIRECTION('',(0.0,0.0,1.0));
15#3=DIRECTION('',(1.0,0.0,0.0));
16#4=AXIS2_PLACEMENT_3D('',#1,#2,#3);
17#5=PLANE('',#4);
18#6=CARTESIAN_POINT('',(0.0,0.0,0.0));
19#7=CARTESIAN_POINT('',(1.0,0.0,0.0));
20#8=CARTESIAN_POINT('',(1.0,1.0,0.0));
21#9=CARTESIAN_POINT('',(0.0,1.0,0.0));
22#10=VERTEX_POINT('',#6);
23#11=VERTEX_POINT('',#7);
24#12=VERTEX_POINT('',#8);
25#13=VERTEX_POINT('',#9);
26#14=DIRECTION('',(1.0,0.0,0.0));
27#15=VECTOR('',#14,1.0);
28#16=LINE('',#6,#15);
29#17=EDGE_CURVE('',#10,#11,#16,.T.);
30#18=DIRECTION('',(0.0,1.0,0.0));
31#19=VECTOR('',#18,1.0);
32#20=LINE('',#7,#19);
33#21=EDGE_CURVE('',#11,#12,#20,.T.);
34#22=DIRECTION('',(-1.0,0.0,0.0));
35#23=VECTOR('',#22,1.0);
36#24=LINE('',#8,#23);
37#25=EDGE_CURVE('',#12,#13,#24,.T.);
38#26=DIRECTION('',(0.0,-1.0,0.0));
39#27=VECTOR('',#26,1.0);
40#28=LINE('',#9,#27);
41#29=EDGE_CURVE('',#13,#10,#28,.T.);
42#30=ORIENTED_EDGE('',$,$,#17,.T.);
43#31=ORIENTED_EDGE('',$,$,#21,.T.);
44#32=ORIENTED_EDGE('',$,$,#25,.T.);
45#33=ORIENTED_EDGE('',$,$,#29,.T.);
46#34=EDGE_LOOP('',(#30,#31,#32,#33));
47#35=FACE_OUTER_BOUND('',#34,.T.);
48#36=ADVANCED_FACE('',(#35),#5,.T.);
49#37=OPEN_SHELL('',(#36));
50#38=SHELL_BASED_SURFACE_MODEL('',(#37));
51#100=APPLICATION_CONTEXT('mechanical design');
52#101=PRODUCT_CONTEXT('',#100,'mechanical');
53#102=PRODUCT('U051','U051','',(#101));
54#103=PRODUCT_DEFINITION_FORMATION('','',#102);
55#104=PRODUCT_DEFINITION_CONTEXT('part definition',#100,'design');
56#105=PRODUCT_DEFINITION('','',#103,#104);
57#106=PRODUCT_DEFINITION_SHAPE('','',#105);
58/* DEFECT: context_of_items = $ (null) -- no unit context reachable for this representation */
59#107=SHAPE_REPRESENTATION('no_context_shape',(#38),$);
60#108=SHAPE_DEFINITION_REPRESENTATION(#106,#107);
61ENDSEC;
62END-ISO-10303-21;