step-examples/12-8-mixed/M160.stp
Sources
- OCCT MANTIS#0033543
- bug-reporter language: "STEP file is not imported correctly", "reader returns empty document on valid file", "silent failure on STEP import". (OCCT MANTIS tracker 502 as of 2026-05-02)
Sender
Producers that emit `SHAPE_REPRESENTATION_RELATIONSHIP` records linking sub-shapes via a non-default representation context, where the receiver's wiring expects the default context.
Description
A STEP file contains valid `MANIFOLD_SOLID_BREP`s wrapped in `ADVANCED_BREP_SHAPE_REPRESENTATION`, but the assembly is glued together by `SHAPE_REPRESENTATION_RELATIONSHIP` records whose `rep_1` and `rep_2` slots reference each other in an order the reader's traversal does not expect. The reader walks only the top-level `PRODUCT_DEFINITION` chain, finds no shape attached, and reports success with an empty document. The geometry is in the file but never reaches the user.
Reproducer recipe
Two `ADVANCED_BREP_SHAPE_REPRESENTATION` entities linked by `SHAPE_REPRESENTATION_RELATIONSHIP(#A,#B)` where the top-level `PRODUCT_DEFINITION_SHAPE` only sees representation B. Reader imports nothing.
Expected kernel behavior
heal-and-accept; traverse `SHAPE_REPRESENTATION_RELATIONSHIP` in both directions during shape resolution; emit `W_UNATTACHED_SHAPE_REPRESENTATION` if any representation containing geometry is unreached at the end of the import.
Notes
**See also**: A067, M120. Synonyms: "STEP file is not imported correctly", "reader returns empty document on valid file", "SHAPE_REPRESENTATION_RELATIONSHIP not traversed", "silent-empty import on legitimate STEP file".
Expected validation
occt=shape(1)/shape(1) gmsh=shape(3) ifc=schema_n/a
Byte assertions
contains(b'SHAPE_REPRESENTATION_RELATIONSHIP')contains(b'MANIFOLD_SOLID_BREP') or contains(b'ADVANCED_BREP_SHAPE_REPRESENTATION')
Tier-3 assertions
n_faces_total == 1
Cross-references
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* M160: STEP file imports as near-empty document despite well-formed entities; input: AP214 STEP file (OCCT MANTIS#0033543 pattern) with MANIFOLD_SOLID_BREP in ADVANCED_BREP_SHAPE_REPRESENTATION (repB) linked to a geometry-free repA via SHAPE_REPRESENTATION_RELATIONSHIP; PRODUCT_DEFINITION_SHAPE references repA (empty) not repB (with geometry); reader traverses only the top-level PRODUCT_DEFINITION chain, finds repA with no solid, and reports success with empty document; geometry in repB is never reached; expected kernel behavior: heal-and-accept; traverse SHAPE_REPRESENTATION_RELATIONSHIP in both directions; emit W_UNATTACHED_SHAPE_REPRESENTATION if any representation containing geometry is unreached after import; synonyms: STEP file is not imported correctly, reader returns empty document on valid file, SHAPE_REPRESENTATION_RELATIONSHIP not traversed, silent-empty import on legitimate STEP file */ 3HEADER; 4FILE_DESCRIPTION(('M160'),'2;1'); 5FILE_NAME('M160.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','',''); 6FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 7ENDSEC; 8DATA; 9#1=CARTESIAN_POINT('',(0.0,0.0,0.0)); 10#2=DIRECTION('',(0.0,0.0,1.0)); 11#3=DIRECTION('',(1.0,0.0,0.0)); 12#4=AXIS2_PLACEMENT_3D('',#1,#2,#3); 13#5=PLANE('',#4); 14#6=CARTESIAN_POINT('',(0.0,0.0,0.0)); 15#7=CARTESIAN_POINT('',(1.0,0.0,0.0)); 16#8=VERTEX_POINT('',#6); 17#9=VERTEX_POINT('',#7); 18#10=DIRECTION('',(1.0,0.0,0.0)); 19#11=VECTOR('',#10,1.0); 20#12=LINE('',#6,#11); 21#13=EDGE_CURVE('',#8,#9,#12,.T.); 22#14=ORIENTED_EDGE('',$,$,#13,.T.); 23#15=EDGE_LOOP('',(#14)); 24#16=FACE_OUTER_BOUND('',#15,.T.); 25#17=ADVANCED_FACE('',(#16),#5,.T.); 26#18=CLOSED_SHELL('',(#17)); 27#19=MANIFOLD_SOLID_BREP('shape_inside_repB',#18); 28#20=(GEOMETRIC_REPRESENTATION_CONTEXT(3) GLOBAL_UNIT_ASSIGNED_CONTEXT((#4)) REPRESENTATION_CONTEXT('','3D')); 29#21=ADVANCED_BREP_SHAPE_REPRESENTATION('repA',(#4),#20); 30#22=ADVANCED_BREP_SHAPE_REPRESENTATION('repB',(#19),#20); 31#23=SHAPE_REPRESENTATION_RELATIONSHIP('','linkAB',#21,#22); 32#24=APPLICATION_CONTEXT('automotive_design'); 33#25=APPLICATION_PROTOCOL_DEFINITION('international standard','automotive_design',2000,#24); 34#26=PRODUCT_CONTEXT('',#24,'mechanical'); 35#27=PRODUCT_DEFINITION_CONTEXT('part definition',#24,'design'); 36#28=PRODUCT('M160','silent empty','',(#26)); 37#29=PRODUCT_DEFINITION_FORMATION('','',#28); 38#30=PRODUCT_DEFINITION('design','',#29,#27); 39#31=PRODUCT_DEFINITION_SHAPE('','',#30); 40#32=SHAPE_DEFINITION_REPRESENTATION(#31,#21); 41ENDSEC; 42END-ISO-10303-21;