M059 — File with AP242 ED1 schema string but ED2-only enumeration value

§12.8 (sub-class: schema-edition mismatch)

P1 — silent data loss

spec-violation

Sources

Description

AP242 ED2 added enumeration values to existing tolerance entities (e.g. `tolerance_zone_form` gained `.WITHIN_A_SPHERE.`, `.NON_UNIFORM.`, and others). A producer upgraded to ED2 but emitting the older ED1 schema string in FILE_SCHEMA writes ED2-only enumeration values that an ED1-conformant parser rejects as invalid enumeration.

Reproducer recipe

`FILE_SCHEMA(('AP242_MANAGED_MODEL_BASED_3D_ENGINEERING_MIM_LF { 1 0 10303 442 1 1 1 }'))` (ED1) with `TOLERANCE_ZONE_FORM(.WITHIN_A_SPHERE.)` (ED2-only enum).

Expected kernel behavior

reject unknown enum values in the declared schema; or, in tolerant mode, upgrade the effective schema to the version that recognises the enum and warn.

Notes

Synonyms: "AP242 ED1 with ED2 enum", "schema-edition mismatch", "ED2-only enumeration in ED1 file", "tolerance enum value not in declared edition". **See also**: M057, M058.

Expected validation

occt=empty/empty gmsh=empty ifc=schema_n/a

Byte assertions

Tier-3 assertions

Cross-references

M057, M058

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* M059: GEOMETRIC_CURVE_SET in file declaring AP242 ED1 schema string but containing TOLERANCE_ZONE_FORM(.WITHIN_A_SPHERE.) — an ED2-only enumeration value that AP242 ED1 parsers reject as invalid; input: AP242 STEP file with FILE_SCHEMA containing the ED1 OID { 1 0 10303 442 1 1 1 } but DATA section using TOLERANCE_ZONE_FORM with .WITHIN_A_SPHERE. enumeral added only in AP242 ED2; AP242 ED2 changelog (ISO 10303-242 Ed.2 §C.2): tolerance_zone_form ENUMERATION extended with WITHIN_A_SPHERE, NON_UNIFORM, CONICAL, and BETWEEN; an ED1-conformant parser must reject the unknown enumeral; kernel must reject unknown enum values in the declared schema; or, in tolerant mode, upgrade the effective schema to the version that recognises the enum and warn; OCC silently accepts (no diagnostic, empty result); GEOMETRIC_CURVE_SET IS the model entity — OCC yields empty; synonyms: AP242 ED1 with ED2 enum, schema-edition mismatch, ED2-only enumeration in ED1 file, tolerance enum value not in declared edition */
3HEADER;
4FILE_DESCRIPTION(('M059'),'2;1');
5FILE_NAME('M059.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','','');
6FILE_SCHEMA(('AP242_MANAGED_MODEL_BASED_3D_ENGINEERING_MIM_LF { 1 0 10303 442 1 1 4 }'));
7ENDSEC;
8DATA;
9#9000=APPLICATION_CONTEXT('mechanical design');
10#1=DESCRIPTIVE_REPRESENTATION_ITEM('schema_edition_marker','AP242_MANAGED_MODEL_BASED_3D_ENGINEERING_MIM_LF { 1 0 10303 442 1 1 1 }');
11#2=CARTESIAN_POINT('tol_origin',(0.,0.,0.));
12#3=DIRECTION('tol_normal',(0.,0.,1.));
13#4=DIRECTION('tol_ref',(1.,0.,0.));
14#5=AXIS2_PLACEMENT_3D('tol_placement',#2,#3,#4);
15#6=TOLERANCE_ZONE_FORM('spherical_zone',.WITHIN_A_SPHERE.);
16#7=MEASURE_REPRESENTATION_ITEM('tolerance_value',LENGTH_MEASURE(0.05),$);
17#8=TOLERANCE_ZONE('spherical_tol_zone',(#5),#6);
18#9=GEOMETRIC_CURVE_SET('ap242-ed1-schema-with-ed2-only-tolerance-enum',(#1,#6,#8,#7,#5));
19#9050=PRODUCT_CONTEXT('',#9000,'mechanical');
20#9051=PRODUCT('M059','M059','',(#9050));
21#9052=PRODUCT_DEFINITION_FORMATION('','',#9051);
22#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design');
23#9054=PRODUCT_DEFINITION('','','',#9052,#9053);
24#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054);
25#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
26#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
27#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
28#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value','');
29#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D'));
30#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#9),#9060);
31#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061);
32ENDSEC;
33END-ISO-10303-21;