A098 — Writer-emitted STEP cannot be re-imported by the same writing process (round-trip refused)

§12.6 assembly hierarchy

P1 — silent data loss

round-trip assembly

Sources

Sender

FreeCAD 1.0RC2 (and earlier stretches): export pipeline emits a file that the import pipeline of the same build silently rejects.

Description

A file authored in build N, exported as STEP from build N, and re-imported into build N produces zero geometry; yet the same file imports cleanly into build N-1. The signature is a `SHAPE_REPRESENTATION` whose `AXIS2_PLACEMENT_3D` first attribute (`location`) refers to a `CARTESIAN_POINT` that was emitted *after* the `SHAPE_REPRESENTATION` in the file but referenced from within (forward reference is legal per ISO 10303-21 §11 but the build-N reader has a regression in its forward-reference resolver).

Reproducer recipe

STEP file where `#10=SHAPE_REPRESENTATION('part',(#100),#101);` appears before `#100=AXIS2_PLACEMENT_3D('',#150,#151,#152);` and `#150=CARTESIAN_POINT('',(0.0,0.0,0.0));` — every reference is forward-only.

Expected kernel behavior

forward references are spec-legal; the importer must do a two-pass parse. Reject with a clear diagnostic rather than silent-empty if forward resolution fails.

Notes

Synonyms: "self-import refused", "round-trip with same version broken", "freecad cannot read its own export", "RC2-exported STEP fails RC2 import".

Expected validation

occt=shape(1)/shape(1) gmsh=shape(9) 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/* A098: SHAPE_REPRESENTATION at #10 with all-forward refs — build-N reader silently drops on re-import (self-roundtrip regression) */
3HEADER;
4FILE_DESCRIPTION(('A098'),'2;1');
5FILE_NAME('A098.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','','');
6FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }'));
7ENDSEC;
8DATA;
9#9000=APPLICATION_CONTEXT('mechanical design');
10#1=CARTESIAN_POINT('filler_0',(0.0,0.0,0.0));
11#2=CARTESIAN_POINT('filler_1',(0.0,0.0,1.0));
12#3=CARTESIAN_POINT('filler_2',(0.0,0.0,2.0));
13#4=CARTESIAN_POINT('filler_3',(0.0,0.0,3.0));
14#5=CARTESIAN_POINT('filler_4',(0.0,0.0,4.0));
15#6=CARTESIAN_POINT('filler_5',(0.0,0.0,5.0));
16#7=CARTESIAN_POINT('filler_6',(0.0,0.0,6.0));
17#8=CARTESIAN_POINT('filler_7',(0.0,0.0,7.0));
18#9=CARTESIAN_POINT('filler_8',(0.0,0.0,8.0));
19#10=SHAPE_REPRESENTATION('part',(#11),#12);
20#11=CARTESIAN_POINT('fwd_origin',(0.0,0.0,0.0));
21#12=REPRESENTATION_CONTEXT('','3D');
22#13=CARTESIAN_POINT('',(0.0,0.0,0.0));
23#14=DIRECTION('',(0.0,0.0,1.0));
24#15=DIRECTION('',(1.0,0.0,0.0));
25#16=AXIS2_PLACEMENT_3D('',#13,#14,#15);
26#17=PLANE('',#16);
27#18=CARTESIAN_POINT('',(0.0,0.0,0.0));
28#19=CARTESIAN_POINT('',(1.0,0.0,0.0));
29#20=CARTESIAN_POINT('',(1.0,1.0,0.0));
30#21=CARTESIAN_POINT('',(0.0,1.0,0.0));
31#22=VERTEX_POINT('',#18);
32#23=VERTEX_POINT('',#19);
33#24=VERTEX_POINT('',#20);
34#25=VERTEX_POINT('',#21);
35#26=DIRECTION('',(1.0,0.0,0.0));
36#27=VECTOR('',#26,1.0);
37#28=LINE('',#18,#27);
38#29=EDGE_CURVE('',#22,#23,#28,.T.);
39#30=DIRECTION('',(0.0,1.0,0.0));
40#31=VECTOR('',#30,1.0);
41#32=LINE('',#19,#31);
42#33=EDGE_CURVE('',#23,#24,#32,.T.);
43#34=DIRECTION('',(-1.0,0.0,0.0));
44#35=VECTOR('',#34,1.0);
45#36=LINE('',#20,#35);
46#37=EDGE_CURVE('',#24,#25,#36,.T.);
47#38=DIRECTION('',(0.0,-1.0,0.0));
48#39=VECTOR('',#38,1.0);
49#40=LINE('',#21,#39);
50#41=EDGE_CURVE('',#25,#22,#40,.T.);
51#42=ORIENTED_EDGE('',$,$,#29,.T.);
52#43=ORIENTED_EDGE('',$,$,#33,.T.);
53#44=ORIENTED_EDGE('',$,$,#37,.T.);
54#45=ORIENTED_EDGE('',$,$,#41,.T.);
55#46=EDGE_LOOP('',(#42,#43,#44,#45));
56#47=FACE_OUTER_BOUND('',#46,.T.);
57#48=ADVANCED_FACE('',(#47),#17,.T.);
58#49=OPEN_SHELL('',(#48));
59#50=SHELL_BASED_SURFACE_MODEL('',(#49));
60#9050=PRODUCT_CONTEXT('',#9000,'mechanical');
61#9051=PRODUCT('A098','A098','',(#9050));
62#9052=PRODUCT_DEFINITION_FORMATION('','',#9051);
63#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design');
64#9054=PRODUCT_DEFINITION('','','',#9052,#9053);
65#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054);
66#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
67#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
68#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
69#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value','');
70#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D'));
71#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#50),#9060);
72#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061);
73#9063=COLOUR_RGB('part_color',0.5,0.5,0.5);
74#9064=FILL_AREA_STYLE_COLOUR('',#9063);
75#9065=FILL_AREA_STYLE('',(#9064));
76#9066=SURFACE_STYLE_FILL_AREA(#9065);
77#9067=SURFACE_SIDE_STYLE('',(#9066));
78#9068=SURFACE_STYLE_USAGE(.BOTH.,#9067);
79#9069=PRESENTATION_STYLE_ASSIGNMENT((#9068));
80#9070=STYLED_ITEM('part_style',(#9069),#48);
81ENDSEC;
82END-ISO-10303-21;