step-examples/12-7-pmi/Pmi065.stp
Sources
- 17-standards-bodies (M030), 02-caxif (External Reference v3.1 §7.5.2)
Description
AP242 supports referencing geometric elements (a specific face, edge) in a separate Part 21 file via `component_path_shape_aspect` / External Element Reference / DDP linking. When the package is repacked or split, the references break; PMI in file A points to a face in file B that no longer exists or has a different ID. Additionally, `component_path_shape_aspect.of_shape.product_definition_shape.definition` must reference the root product_definition; the leaf-end shape_aspect's `of_shape.definition` must reference the leaf product_definition. Mid-tree anchors are wrong.
Reproducer recipe
DDP archive where assembly-level PMI in `assembly.stp` references face 47 in `part_3.stp`; rename/re-export `part_3.stp` and the link breaks. Or set `of_shape` to point at L-Bracket-Assembly (intermediate) when it should point at AS1 (root).
Expected kernel behavior
Archive-stable requires DDP integrity check; reject if cross-file refs do not resolve. Verify the of_shape↔root invariant and reject mid-tree anchors. Persistent IDs are the intended mitigation.
Notes
**See also**: A013, N044. Synonyms: "DDP / EER cross-file PMI references break on repackaging", "external PMI reference broken when files moved", "cross-file PMI link lost on repackage".
Expected validation
occt=shape(1)/shape(1) gmsh=shape(1) ifc=schema_n/a
Byte assertions
contains(b'COMPONENT_PATH_SHAPE_ASPECT')contains(b'DOCUMENT_FILE')count_entity_def(b'PRODUCT') == 3
Tier-3 assertions
shape_null == Falsen_vertices_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/* Pmi065: COMPONENT_PATH_SHAPE_ASPECT references a shape aspect in an external DOCUMENT_FILE (part_3.stp); when the DDP archive is repacked or part_3.stp is renamed the cross-file PMI reference breaks silently; additionally the of_shape attribute anchors to an intermediate assembly product_definition rather than the root, violating the AP242 invariant that of_shape must reference the root product_definition; receivers must reject when cross-file refs do not resolve; GEOMETRIC_CURVE_SET IS model entity â OCC yields empty */ 3HEADER; 4FILE_DESCRIPTION(('Pmi065'),'2;1'); 5FILE_NAME('Pmi065.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('',(0.0,0.0,0.0)); 11#2=GEOMETRIC_CURVE_SET('',(#1)); 12#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 13#9051=PRODUCT('Pmi065','Pmi065','',(#9050)); 14#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 15#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 16#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 17#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 18#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 19#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 20#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 21#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 22#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 23#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#2),#9060); 24#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 25#9063=APPLICATION_CONTEXT('mechanical design'); 26#9064=PRODUCT_CONTEXT(#9063,'mechanical',''); 27#9065=PRODUCT('part_2','part_2','',(#9064)); 28#9066=PRODUCT_DEFINITION_FORMATION('','',#9065); 29#9067=PRODUCT_DEFINITION_CONTEXT(#9063,'design',''); 30#9068=PRODUCT_DEFINITION('','',#9066,#9067); 31#9069=PRODUCT('part_3','part_3','',(#9064)); 32#9070=PRODUCT_DEFINITION_FORMATION('','',#9069); 33#9071=PRODUCT_DEFINITION('','',#9070,#9067); 34#9072=DOCUMENT('part2_doc','part_2.stp','Part 2 external file'); 35#9073=DOCUMENT_FILE(#9072,'part_2.stp'); 36#9074=DOCUMENT('part3_doc','part_3.stp','Part 3 external file'); 37#9075=DOCUMENT_FILE(#9074,'part_3.stp'); 38#9076=SHAPE_ASPECT('assy_face_ref','assembly face reference',#9055,.T.); 39#9077=PRODUCT_DEFINITION_SHAPE('','',#9068); 40#9078=SHAPE_ASPECT('face_47','external face 47',#9077,.T.); 41#9079=COMPONENT_PATH_SHAPE_ASPECT('cross_file_ref','cross-file PMI ref',#9076,(#9078)); 42ENDSEC; 43END-ISO-10303-21;