step-examples/12-8-mixed/M180.stp
Sources
- 16-iso-spec ISO 10303-238 §5.8 inspection_result uncertainty-vs-tolerance gauge-capability rule
- bug-reporter language: "AP238 measurement uncertainty exceeds tol", "STEP-NC inspection meaningless", "gauge can't resolve tolerance".
Description
An `INSPECTION_RESULT` records a `measurement_uncertainty` of 0.05 mm against a feature whose design tolerance is +/-0.02 mm. The measurement is statistically incapable of confirming or denying conformance - it tells you nothing. Reporting it as "in spec" or "out of spec" is misleading. Bug-reporter language: "AP238 inspection uncertainty > tolerance", "STEP-NC gauge R&R insufficient", "measurement uncertainty exceeds feature tol".
Reproducer recipe
a `PLUS_MINUS_TOLERANCE` of +/-0.02 mm on a feature; an `INSPECTION_RESULT` with `measurement_uncertainty = 0.05` mm against the same feature.
Expected kernel behavior
validate that measurement uncertainty is below feature tolerance; reject as gauge-incapable or warn.
Notes
Synonyms: "AP238 gauge R&R insufficient", "STEP-NC inspection uncertainty exceeds tol", "measurement uncertainty too large", "gauge can't resolve feature tolerance".
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Byte assertions
contains(b'AP238_STEP_NC_MIM')contains(b'INSPECTION_RESULT')contains(b'PLUS_MINUS_TOLERANCE')
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/* M180: AP238 inspection_result measurement uncertainty exceeds feature tolerance */ 3/* DEFECT: INSPECTION_RESULT uncertainty 0.05 mm; PLUS_MINUS_TOLERANCE +/-0.02 mm */ 4/* Measurement uncertainty 0.05 mm exceeds feature tolerance range 0.04 mm */ 5/* Gauge cannot statistically confirm or deny conformance with this tolerance */ 6/* Reporting as in-spec or out-of-spec is meaningless â gauge incapable */ 7/* Per ISO 10303-238 §5.8 uncertainty must be below tolerance for valid inspection */ 8/* Byte assertion: contains(b'AP238_STEP_NC_MIM') */ 9/* Byte assertion: contains(b'INSPECTION_RESULT') */ 10/* Byte assertion: contains(b'PLUS_MINUS_TOLERANCE') */ 11HEADER; 12FILE_DESCRIPTION(('M180: AP238 inspection_result uncertainty 0.05mm exceeds tolerance 0.02mm'),'2;1'); 13FILE_NAME('M180.stp','2026-06-21T00:00:00',(''),(''),'cad-research-suite','',''); 14/* Byte assertion: contains(b'AP238_STEP_NC_MIM') */ 15FILE_SCHEMA(('AP238_STEP_NC_MIM { 1 0 10303 238 3 1 1 1 }')); 16ENDSEC; 17DATA; 18/* Standard unit context (mm) */ 19#10=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 20#11=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 21#12=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 22#13=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(0.001),#10, 23 'distance_accuracy_value','maximum model space distance between geometric entities'); 24#14=(GEOMETRIC_REPRESENTATION_CONTEXT(3) 25 GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#13)) 26 GLOBAL_UNIT_ASSIGNED_CONTEXT((#10,#11,#12)) 27 REPRESENTATION_CONTEXT('ctx','3D')); 28/* mm length unit reference for MEASURE_WITH_UNIT */ 29#15=SI_UNIT(.MILLI.,.METRE.); 30/* GEOMETRIC_CURVE_SET IS the model entity â OCC yields empty */ 31#20=GEOMETRIC_CURVE_SET('ap238-inspection-uncertainty-exceeds-feature-tolerance', 32 (#43,#52,#60)); 33/* Byte assertion: contains(b'PLUS_MINUS_TOLERANCE') */ 34/* Feature design tolerance: +/-0.02 mm (total range 0.04 mm) */ 35#41=MEASURE_WITH_UNIT(POSITIVE_LENGTH_MEASURE(0.02),#15); 36#40=PLUS_MINUS_TOLERANCE(#41,$); 37/* DEFECT: measurement_uncertainty 0.05 mm exceeds tolerance range 0.04 mm */ 38#42=MEASURE_WITH_UNIT(POSITIVE_LENGTH_MEASURE(0.05),#15); 39/* Byte assertion: contains(b'INSPECTION_RESULT') */ 40/* DEFECT: INSPECTION_RESULT with uncertainty 0.05mm against +/-0.02mm tolerance */ 41#43=INSPECTION_RESULT('bad_inspection_result',$,#40,#42,$); 42/* WORKPIECE 'inspection_workpiece' */ 43#60=WORKPIECE('inspection_workpiece','Workpiece for gauge-incapable inspection test',$,$,$,$,$); 44/* INSPECTION_OPERATION references the bad inspection result */ 45#52=INSPECTION_OPERATION('inspection_op',$,$,$,$,$,#43,$); 46/* MACHINING_WORKINGSTEP links inspection op to workpiece */ 47#51=MACHINING_WORKINGSTEP('inspection_step','Gauge-incapable inspection workingstep',#52,#60,$); 48/* WORKPLAN: single inspection step with gauge-incapable uncertainty */ 49#50=WORKPLAN('inspection_gauge_incapable_program','Gauge incapable inspection workplan',(),$,(#51)); 50/* Product chain */ 51#100=APPLICATION_CONTEXT('mechanical design'); 52#101=PRODUCT_CONTEXT('',#100,'mechanical'); 53#102=PRODUCT('M180','M180','M180',(#101)); 54#103=PRODUCT_DEFINITION_FORMATION('','',#102); 55#104=PRODUCT_DEFINITION_CONTEXT(#100,'design'); 56#105=PRODUCT_DEFINITION('','',#103,#104); 57#106=PRODUCT_DEFINITION_SHAPE('','',#105); 58#107=SHAPE_REPRESENTATION('',(#20),#14); 59#108=SHAPE_DEFINITION_REPRESENTATION(#106,#107); 60ENDSEC; 61END-ISO-10303-21;