step-examples/12-13-writer-pathology/Wr018.stp
Sources
- OCCT MANTIS#0027xxx-class
- bug-reporter language: "STEP loaded but model is empty" (OCCT MANTIS tracker 502 as of 2026-05-02)
Sender
Writers that initialise the product structure tree before geometry is computed and forget to suppress empty trees on export when computation fails or is cancelled
Description
The file contains a complete product-structure scaffold (`APPLICATION_CONTEXT`, `PRODUCT`, `PRODUCT_DEFINITION`, `SHAPE_DEFINITION_REPRESENTATION`, `SHAPE_REPRESENTATION`) with all the right cross-references, but the `SHAPE_REPRESENTATION.items` list is empty or contains only placement axes; no `MANIFOLD_SOLID_BREP`, no `SHELL_BASED_SURFACE_MODEL`, no `TESSELLATED_SHELL_REPRESENTATION`. The receiver loads "successfully" but reports zero solids. Bug-reporter language: "STEP file loaded but nothing visible", "empty model", "product tree but no geometry", "ghost STEP file".
Reproducer recipe
full scaffold ending with `SHAPE_REPRESENTATION('main',(#13),#24)` where `#13` is just an `AXIS2_PLACEMENT_3D` and there is no shape.
Expected kernel behavior
Warn and accept: emit a warning that the file describes a product but contains no geometry; do not reject (well-formed empty product is permitted).
Notes
A "successful empty load" is the most confusing failure mode for end users.
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Byte assertions
matches(rb"SHAPE_REPRESENTATION\('[^']*',\(#\d+\),#")
Tier-3 assertions
load == "ok"
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* Wr018: complete product scaffold with no geometry in SHAPE_REPRESENTATION */ 3/* Writer initialised product structure before geometry was computed */ 4/* SHAPE_REPRESENTATION.items contains only an AXIS2_PLACEMENT_3D */ 5HEADER; 6FILE_DESCRIPTION(('Wr018 - empty shape representation chain'),'2;1'); 7FILE_NAME('Wr018.stp','2026-06-20T00:00:00',(''),(''),'cad-research-suite','',''); 8FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 9ENDSEC; 10DATA; 11/* Product structure scaffold */ 12#1=APPLICATION_CONTEXT('mechanical design'); 13#2=APPLICATION_PROTOCOL_DEFINITION('international standard', 14 'automotive_design',2003,#1); 15#3=PRODUCT_CONTEXT('',#1,'mechanical'); 16#4=PRODUCT('Wr018','Wr018','',(#3)); 17#5=PRODUCT_DEFINITION_FORMATION('','',#4); 18#6=PRODUCT_DEFINITION_CONTEXT(#1,'design'); 19#7=PRODUCT_DEFINITION('design','',#5,#6); 20#8=PRODUCT_DEFINITION_SHAPE('','',#7); 21/* Placement axis â this is the ONLY item in SHAPE_REPRESENTATION */ 22#9=CARTESIAN_POINT('origin',(0.,0.,0.)); 23#10=DIRECTION('z-axis',(0.,0.,1.)); 24#11=DIRECTION('x-axis',(1.,0.,0.)); 25#12=AXIS2_PLACEMENT_3D('placement',#9,#10,#11); 26/* Unit context */ 27#13=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 28#14=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 29#15=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 30#16=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#13, 31 'distance_accuracy_value',''); 32#17=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#16))GLOBAL_UNIT_ASSIGNED_CONTEXT((#13,#14,#15))REPRESENTATION_CONTEXT('','3D')); 33/* SHAPE_REPRESENTATION with only a placement â no geometry shape */ 34#18=SHAPE_REPRESENTATION('main',(#12),#17); 35#19=SHAPE_DEFINITION_REPRESENTATION(#8,#18); 36ENDSEC; 37END-ISO-10303-21;