step-examples/12-7-pmi/Pmi161.stp
Sources
- Pattern-mined from NIST MBE PMI test suite / CAx-IF FTC/CTC AP242 files (public-domain / describe-only — pattern only, no bytes copied)
- audit/mining_nist_mbxif_2026-07.md #4.
Description
An AP242 Ed.2 datum-reference frame A|B(Ⓜ)|C encodes the datum system as ordered `datum_reference_compartment`s, each holding a `datum_reference_element`; a per-datum modifier (here `.MAXIMUM_MATERIAL_REQUIREMENT.` on the secondary datum B) lives in that element's modifiers list. Readers that flatten the datum system to a legacy flat `datum_reference` list lose both the compartment ORDERING (primary/secondary/tertiary) and the per-datum modifier. The corpus has identical-datum / common-datum entries (Pmi025/027/028) but none carries compartment + per-datum modifier.
Reproducer recipe
AP242 file; three `DATUM`s A/B/C; three `DATUM_REFERENCE_ELEMENT`s (B's modifiers list = `(.MAXIMUM_MATERIAL_REQUIREMENT.)`); three ordered `DATUM_REFERENCE_COMPARTMENT`s ('primary'/'secondary'/'tertiary'); `DATUM_SYSTEM('A|B(M)|C',...)`; a `POSITION_TOLERANCE` referencing the datum system.
Expected kernel behavior
Preserve the compartment ordering AND the per-datum modifier; do not flatten to an unordered/legacy datum-reference list.
Notes
Semantic-PMI carrier geometry is a `GEOMETRIC_CURVE_SET` (single point → one loaded vertex, like Pmi010). See also: Pmi025, Pmi027, Pmi028. Synonyms: "per-datum MMC modifier lost", "datum reference compartment ordering flattened", "datum_reference_element modifier dropped", "MMC on datum B not preserved", "datum system A|B(M)|C degraded". Provenance tier: bytes-only — datum-system modifier metadata is oracle-invisible at BRep load (OCC loads only the carrier geometry); pattern-mined, not yet mutation-verified.
Expected validation
occt=shape(1)/shape(1) gmsh=shape(1) ifc=schema_n/a
Provenance tier
bytes-only — defect not fully embodied in fixture bytes.
Byte assertions
count_entity_def(b'DATUM_REFERENCE_COMPARTMENT') == 3contains(b'DATUM_REFERENCE_ELEMENT')contains(b'MAXIMUM_MATERIAL_REQUIREMENT')
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/* Pmi161: DATUM_SYSTEM A|B(M)|C: three ordered DATUM_REFERENCE_COMPARTMENTs, the secondary bearing a DATUM_REFERENCE_ELEMENT whose modifiers list holds .MAXIMUM_MATERIAL_REQUIREMENT. (MMC on datum B); flattening to a legacy datum_reference list loses ordering AND modifier; GEOMETRIC_CURVE_SET IS model entity â OCC loads the point as one vertex */ 3HEADER; 4FILE_DESCRIPTION(('Pmi161'),'2;1'); 5FILE_NAME('Pmi161.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=CARTESIAN_POINT('',(0.0,0.0,0.0)); 11#2=GEOMETRIC_CURVE_SET('',(#1)); 12#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 13#9051=PRODUCT('Pmi161','Pmi161','',(#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=DATUM('A','primary datum',#9055,.T.,'A'); 26#9064=DATUM('B','secondary datum',#9055,.T.,'B'); 27#9065=DATUM('C','tertiary datum',#9055,.T.,'C'); 28#9066=DATUM_REFERENCE_ELEMENT('',$,#9063); 29#9067=DATUM_REFERENCE_ELEMENT('',(.MAXIMUM_MATERIAL_REQUIREMENT.),#9064); 30#9068=DATUM_REFERENCE_ELEMENT('',$,#9065); 31#9069=DATUM_REFERENCE_COMPARTMENT('primary',$,#9066); 32#9070=DATUM_REFERENCE_COMPARTMENT('secondary',$,#9067); 33#9071=DATUM_REFERENCE_COMPARTMENT('tertiary',$,#9068); 34#9072=DATUM_SYSTEM('A|B(M)|C','',#9055,.T.,(#9069,#9070,#9071)); 35#9073=SHAPE_ASPECT('hole_axis','toleranced hole',#9055,.T.); 36#9074=LENGTH_MEASURE_WITH_UNIT(LENGTH_MEASURE(0.1),#9056); 37#9075=POSITION_TOLERANCE('pos','position 0.1 wrt A|B(M)|C',#9074,#9073,#9072); 38ENDSEC; 39END-ISO-10303-21;