step-examples/12-7-pmi/Pmi070.stp
Sources
- 16-iso-spec AP242 §GEOMETRIC_TOLERANCE_RELATIONSHIP
Description
AP242 GEOMETRIC_TOLERANCE_RELATIONSHIP allows one tolerance to be derived/refined from another (e.g. a position tolerance refined under MMC by a separate form tolerance). The spec does not explicitly forbid cycles; producers that compose tolerance frames programmatically can emit a cycle by linking three GEOMETRIC_TOLERANCE_RELATIONSHIP records A→B, B→C, C→A. A receiver that walks the relationship graph to evaluate a tolerance recurses infinitely or hits a stack guard.
Reproducer recipe
three GEOMETRIC_TOLERANCE entities A, B, C, three GEOMETRIC_TOLERANCE_RELATIONSHIP entities forming the cycle A refines B, B refines C, C refines A.
Expected kernel behavior
detect cycles in the tolerance-relationship graph at load time; reject the cycle with a precise diagnostic naming the cycle members.
Notes
**See also**: Pmi003. Synonyms: "GEOMETRIC_TOLERANCE_RELATIONSHIP cycle", "tolerance relationship loop A->B->C->A", "circular tolerance dependency".
Expected validation
occt=shape(1)/shape(1) gmsh=shape(1) ifc=schema_n/a
Byte assertions
count_entity_def(b'GEOMETRIC_TOLERANCE') == 3count_entity_def(b'GEOMETRIC_TOLERANCE_RELATIONSHIP') == 3count_entity_def(b'SHAPE_ASPECT') == 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/* Pmi070: GEOMETRIC_TOLERANCE_RELATIONSHIP forms a cycle AâBâCâA across three GEOMETRIC_TOLERANCE entities; any receiver that walks the refinement graph to evaluate a tolerance recurses infinitely or hits a stack guard; receivers must detect cycles in the tolerance-relationship graph at load time and reject with a diagnostic naming the cycle members; GEOMETRIC_CURVE_SET IS model entity â OCC yields empty */ 3HEADER; 4FILE_DESCRIPTION(('Pmi070'),'2;1'); 5FILE_NAME('Pmi070.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('Pmi070','Pmi070','',(#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=SHAPE_ASPECT('feature_A','',#9055,.T.); 26#9064=SHAPE_ASPECT('feature_B','',#9055,.T.); 27#9065=SHAPE_ASPECT('feature_C','',#9055,.T.); 28#9066=MEASURE_REPRESENTATION_ITEM('tol',LENGTH_MEASURE(0.05),#9056); 29#9067=GEOMETRIC_TOLERANCE('gt_A','tolerance A',#9066,#9063); 30#9068=GEOMETRIC_TOLERANCE('gt_B','tolerance B',#9066,#9064); 31#9069=GEOMETRIC_TOLERANCE('gt_C','tolerance C',#9066,#9065); 32#9070=GEOMETRIC_TOLERANCE_RELATIONSHIP('refines','A refines B',#9067,#9068); 33#9071=GEOMETRIC_TOLERANCE_RELATIONSHIP('refines','B refines C',#9068,#9069); 34#9072=GEOMETRIC_TOLERANCE_RELATIONSHIP('refines','C refines A',#9069,#9067); 35ENDSEC; 36END-ISO-10303-21;