step-examples/12-8-mixed/M135.stp
Sources
- 16-iso-spec ISO 10303-203 Ed.1 vs Ed.2 (CC1 / CC2 schema delta)
- bug-reporter language: "AP203 CC1 with CC2 entities", "CONFIG_CONTROL_DESIGN strict reader rejects DESIGN_CONTEXT".
Sender
deduced — PDM exporter that switched its protocol header to CC1 (legacy compatibility) without filtering out CC2-only entities
Description
A file declares the legacy `CONFIG_CONTROL_DESIGN` schema in its `FILE_SCHEMA` yet uses entities such as `DESIGN_CONTEXT` and `MECHANICAL_CONTEXT` that were introduced in the AP203 second- edition (CC2 / CCD2) schema. CC1-strict readers reject the unknown entities; lax readers accept and produce inconsistent results.
Reproducer recipe
`FILE_SCHEMA(('CONFIG_CONTROL_DESIGN'))` with `DESIGN_CONTEXT` / `MECHANICAL_CONTEXT` instances in DATA section.
Expected kernel behavior
warn on schema-version mismatch; either upgrade the declared schema to CC2 or strip the CC2-only entities and reject if neither is acceptable.
Notes
Synonyms: "AP203 schema version mismatch", "CC1/CC2 mix", "legacy schema with newer entities".
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Byte assertions
contains(b'CONFIG_CONTROL_DESIGN')contains(b'DESIGN_CONTEXT')contains(b'MECHANICAL_CONTEXT')
Tier-3 assertions
shape_null == True
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* M135: AP203 CC1 file using CC2-only DESIGN_CONTEXT and MECHANICAL_CONTEXT */ 3/* DEFECT: FILE_SCHEMA declares CONFIG_CONTROL_DESIGN (CC1 / Ed.1) */ 4/* DATA section uses DESIGN_CONTEXT and MECHANICAL_CONTEXT added in CC2 (Ed.2) */ 5/* CC1-strict readers reject with 'unknown entity type'; lax readers get inconsistency */ 6/* Correct fix: upgrade FILE_SCHEMA to CC2, or strip CC2-only entities */ 7/* Byte assertion: contains(b'CONFIG_CONTROL_DESIGN') */ 8/* Byte assertion: contains(b'DESIGN_CONTEXT') */ 9/* Byte assertion: contains(b'MECHANICAL_CONTEXT') */ 10HEADER; 11FILE_DESCRIPTION(('M135: AP203 CC1 schema declaration with CC2-only entities DESIGN_CONTEXT MECHANICAL_CONTEXT'),'2;1'); 12FILE_NAME('M135.stp','2026-06-21T00:00:00',(''),(''),'cad-research-suite','',''); 13/* Byte assertion: contains(b'CONFIG_CONTROL_DESIGN') */ 14/* CC1 / Ed.1 schema declaration â does NOT include CC2-only entity types */ 15FILE_SCHEMA(('CONFIG_CONTROL_DESIGN { 1 0 10303 203 1 0 0 }')); 16ENDSEC; 17DATA; 18#1=APPLICATION_CONTEXT('configuration controlled 3D designs of mechanical parts and assemblies'); 19#2=APPLICATION_PROTOCOL_DEFINITION('international standard', 20 'config_control_design',1994,#1); 21/* Standard unit context (mm) */ 22#10=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 23#11=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 24#12=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 25#13=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(0.001),#10, 26 'distance_accuracy_value','maximum model space distance between geometric entities'); 27#14=(GEOMETRIC_REPRESENTATION_CONTEXT(3) 28 GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#13)) 29 GLOBAL_UNIT_ASSIGNED_CONTEXT((#10,#11,#12)) 30 REPRESENTATION_CONTEXT('ctx','3D')); 31/* Byte assertion: contains(b'MECHANICAL_CONTEXT') */ 32/* DEFECT: MECHANICAL_CONTEXT is a CC2-only entity; CC1 does not define this type */ 33/* CC1 equivalent is PRODUCT_CONTEXT with discipline_type='mechanical' */ 34/* A legacy PDM exporter that switched from CC2 to CC1 header but forgot to strip entities */ 35#20=MECHANICAL_CONTEXT('MECH',#1,'mechanical'); 36/* Byte assertion: contains(b'DESIGN_CONTEXT') */ 37/* DEFECT: DESIGN_CONTEXT is a CC2-only entity; not present in CC1 schema */ 38/* CC1 equivalent is PRODUCT_DEFINITION_CONTEXT with lifecycle_stage='design' */ 39#21=DESIGN_CONTEXT('DESIGN',#1,'design'); 40/* Product using the CC2-only context entities in a CC1-declared file */ 41#30=PRODUCT('PART-099','Valve Body','Main flow control body',(#20)); 42#31=PRODUCT_DEFINITION_FORMATION('rev_A','Production release',#30); 43/* PRODUCT_DEFINITION references DESIGN_CONTEXT (#21) â another CC2-only type */ 44#32=PRODUCT_DEFINITION('design','',#31,#21); 45/* GEOMETRIC_CURVE_SET IS the model entity â OCC yields empty */ 46#500=GEOMETRIC_CURVE_SET('ap203-cc1-schema-with-cc2-only-entities', 47 (#20,#21,#30,#31,#32)); 48/* Product chain */ 49#600=APPLICATION_CONTEXT('mechanical design'); 50#601=PRODUCT_CONTEXT('',#600,'mechanical'); 51#602=PRODUCT('M135','M135','M135',(#601)); 52#603=PRODUCT_DEFINITION_FORMATION('','',#602); 53#604=PRODUCT_DEFINITION_CONTEXT(#600,'design'); 54#605=PRODUCT_DEFINITION('','',#603,#604); 55#606=PRODUCT_DEFINITION_SHAPE('','',#605); 56#607=SHAPE_REPRESENTATION('',(#500),#14); 57#608=SHAPE_DEFINITION_REPRESENTATION(#606,#607); 58ENDSEC; 59END-ISO-10303-21;